Regular expressions in jQuery?
Is it possible to use regular expressions in jQuery?
I'd like to toggle the display a block of items with similar ID's.
i.e
id= "Body" + someString + "Item" + 'toggleGroup'
id="BodyOppsItemS1G1"
id="BodyReqsItemS1G1"
id="BodyProjItemS1G1"
where the variable 'toggleGroup' could be S2G1, S3G1, etc.
Here's what I've got that's not quite working.
$("[id*="+ /\bBody\B\S*\BItem/ +toggleGroup+"]").css('display', 'block');
TIA!