Hi, I have an slider that ads an class (.current-item) to each tab that is on, and removes when it`s off. I want to use LavaLamp for the menu efect and I need to get the position of the each element that has class current-item.
I used:
var my = $("li.current-item");
var myposition = my.position();
function setCurr(el) {
$back.css({'top': myposition.top });
curr = el;
};
But it works only for one item (the first). Afer the slider removes the class and ads the class to the next li nothing happens.
Here it is live: http://asgg.ro/slider-html/ The src to the script is at the bottom of the source.
I`m new to jquery and I really need some help! Thank you very much