+ 2
Why is this toggleclass not working?
7 ответов
+ 19
Wrong method name, there should be toggleClass, not Togglelass.
JQuery is case-sensitive.
+ 5
@NezhnyjVampir is almost right: you should write "toggleClass" intead of "Togglelass" (you miss the uppercase "C" and have a wrong uppercase "T" -- wich must be lowercase)... but that's not JQuery wich is case sensitive, but Javascript (JQuery is not a language, but a Javascript library/framework)...
Fixed code:
$(function() {
$("button").click(function() {
$("div").toggleClass ("Sou");
});
});
+ 3
One problem is that you wrote “Togglelass” instead of “Toggleclass”, but still won’t work with that fixed.
+ 1
I don't know why it is not working
+ 1
They were working in the lessons
+ 1
Thank you very much visph.And you also thanks @NezhnyjVampir.
0
it's not working yet