Lucas Ariel Enrich Lucas Ariel Enrich - 2 years ago 69
Javascript Question

How to remove a class on click event?

this is the html:



</html> `

this the css:

height: 100px;
width: 100px;
background-color: green;

and this the js (EDITED):

var main=function(){




It (STILL) doesn't work. Can someone help me?

Answer Source

To select class, you should preface class name with a dot:


JQuery docs you may want to review.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download