Is there a way that I can write the following selector in a less verbose fashion (the parent id is being repeated again and again).
$("#parent_id .class1 , #parent_id .class2,....")
Thanx!
$("#parent_id").find(".class1, .class2, .class3").....
List your classes in the context of the object like so:
$('.class1, .class2, .class3', $('#parent_id'))
Edit: jsFiddle example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With