javascript - How to remove a class on click event? -


html:

<!doctype html> <html> <head>     <link rel="stylesheet" type="text/css" href="style.css"/>     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>     <script type="text/javascript" src="app.js"></script>      <title>prueba</title> </head> <body>     <div class="prueba"></div> </body> </html> 

css:

.prueba {     height: 100px;     width: 100px;     background-color: green; } 

js (edited):

var main = function() {     $('.prueba').click(function() {         $(this).removeclass('.prueba');     }); };  $(document).ready(main);  

it (still) doesn't work. can me?

to select class, should preface class name dot:

$('.prueba') 

jquery docs may want review.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -