Adding Class to Div in jQuery -


evening all,

i'm trying add class div have not working reason.

$(.example div).addthisclass('example class'); 

why isn't working, works every other time? has jquery changed?

pls help.

there no method addthisclass in jquery. use addclass:

$('div.example').addclass('example class'); 

in vanilla javascript, can use classlist:

document.queryselector('div.example').classlist.add('example class'); 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -