, .
- . $() ( Vanilla JS) , .
, "".
For example, let's say you want to change all the elements .testto green and delete the class. You can do it:
$(".test").removeClass("test");
$(".test").css({"color":"green"});
Just to find that it does not change color to green, because it is $(".test")no longer the same.
And vice versa, if you did this:
var test = $(".test");
test.removeClass("test");
test.css({"color":"green"});
It works. Of course, this is a trivial example, since you can just rearrange the lines of code, and it works too, but I try to do it here: p
source
share