javascript - The jQuery addClass function quits my script -


uhm, i've got this script not work.

it's line: document.getelementbyid('thetest').addclass('superspecial');

as class should added (but isn't) whole script quits... know why?

should be:

jquery('#thetest').addclass('superspecial'); 

or

document.getelementbyid('thetest').classname += ' superspecial'; 

document.getelementbyid doesn't return jquery element.
that's why has no method error.


Comments

Popular posts from this blog

Issues changing the value of an element in an array in matlab -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

vb.net - Alternative to the T-SQL AS keyword -