Select all elements with
data-toggle
attribute no matter value and with (href="#myModal"
ordata-target="#myModal"
).
I've used this:
$('[data-toggle][href="#myModal"], [data-toggle][data-target="#myModal"]');
Not DRY. Is there any simple method or function to do this?
Maybe something like that?
$("[data-toggle]").filter("[href='#myModal'],[data-target='#myModal']");
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