toggleClass() not working from text editor, works in web inspector
hey! I'm having a strange problem, I tried to use toggleclass(), when I put it in the editor doesn't work (the rest of the js runs correctly, so I know the file is well linked) but when I try in web inspector it works perfectly any ideas?
- var main=function(){
- $('#lucas').click(function(){
- $('#lucas').toggleClass("perfil2");
- });
- };
- $(document).ready(main);