Wildcard ID’s - Select by ID and Filter
Here’s a solution for selecting elements by ID and running a regex to filter the results:
$(’*[@id]’).filter(function() {
var regex = /^regularExpressionToMatchIdsAgainst/;
return ( $(this).attr(’id’).match(regex) !== null );
})
Leave a comment
You must be logged in to post a comment.