开发者

Jquery timeout on each

I'm trying to write a jQuery function to change out href of a link, but I'm not quite sure how to do it. I've implemented a slider, but I have a link which lives outside of the slider (outsideLi开发者_开发技巧nk) which needs to change as the slider changes.

I'm trying to achieve the following:

for each link in sliderList
     get currentLink.href
     outsideLink.href = currentLink.href
     wait 3 seconds
     repeat
end

I'm not sure how to implement the delay when I'm going through a list of items though.


I'd approach this a bit different, just update it when the slider changes like this:

$('.selector').slider({
  slide: function(event, ui) {
   //outsideLink.href = currentLink.href
  }
});

You can see a full list of slider events here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜