First of all; example of HTML code:
<div class"grap1"> some conetent</div>
<div class"grap2"> some conetent</div>
<div class"grap3"> some conetent</div>
<div class"blabla">some content></div>
And now i want to select divs that class contains "grap" word somewhere is class name (so in this case first three divs). How can i achieve that ?
This is not working: http://api.jquery.com/attribute-contains-word-selector/
Use the attribute contains selector:
$('div[class*="grap"]')
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