I’m doing a jquery plugin that moves the background of a div (based on another plugin). I don’t understand why if I’ve only 1 on element using $(“.video”).moveBackground(); works well.
If I’ve 2 elements or more, only works the last one.
The code: http://jsfiddle.net/7PfEN/ . It doesn’t works on jsfiddle but works fine (well, only the last) in local.
Thanks in advance!
I believe your problem is that the plugin uses a
sysobject for storing the animation timer, and thesysobject is global for all of the elements you pass in via a single call to.moveBackground().So while this won’t work…
I believe this would…