![]() ![]() ![]() It is, though, getting more and more supported. Unfortunately, these do not work in Internet Explorer prior to v10, though there is a shim to add support for it to IE8 and IE9, available from this page. If ( document.getElementById("MyElement").ntains('M圜lass') )ĭocument.getElementById("MyElement").classList.toggle('M圜lass') Modern browsers have added classList which provides methods to make it easier to manipulate classes without needing a library: document.getElementById("MyElement").classList.add('M圜lass') ĭocument.getElementById("MyElement").classList.remove('M圜lass') Modern HTML5 Techniques for changing classes ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |