I'm currently selecting all elements with class .follow-container, this is the code:
$('.follow-container').html('it's this one');
How do I only select elements that have the class and also the attribute onmousedown="alert()"
$('.follow-container[number="3"]')
Just to mention but you should really use a data attribute instead of an unsupported number attribute.
What about data-number="3" instead?
You could then select this using:
$('.follow-container[data-number="3"]');
If you would prefer to use your attribute you could use:
$('.follow-container[number="3"]');
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