I have a problem with the following code
var elements = $(".myClasses");
elements[1].animate({something}, 1000);
If I use $(".myClasses").animate(...) it works, but why doesn't it work if I select just one element from the array?
I guess I maybe don't uderstand well the rules about objects or arrays.
[0]to a jQuery Object Array will return a DOM element instead of a jQuery element. Because.animate()is a jQuery method, it can only be used on jQuery objects. You're likely looking for$(".myClasses").eq(1)which is the jQuery equivalent to[1].