How can I match something using jquery that is set up as such:
- id=”intersection_resources_4_5″ // hit
- id=”intersection_content_6_5″ // hit
- id=”intersection_content_4_3″ // not
I want to do something like:
$("div:regex(id, intersection_*_*_5)").each(function(){
$(this).click();
});
Is this doable? Assuming, the * is a wildcard, which I cannot seem to get to work.
If you don’t want a plugin, and you don’t want to create your own selector filter, do this:
It would be best if your
<div>elements had a class in order to improve performance.Something like: