开发者

Can jQuery or Javascript simulate a link being clicked?

I have 开发者_StackOverflowa slider on my site but unfortunately it doesn't have an auto mode.

Is it possible to write a function that simulates a link being clicked at certain time intervals so that the slide rotates?


There is a click function that does just that.

var link = $('#your-slider-link');
window.setInterval(function() {
  link.click();
}, 100); // every 100ms.


If understood it right, you could make use of Nivo Slider http://nivo.dev7studios.com/ or use one from this list http://webdesignledger.com/tutorials/13-super-useful-jquery-content-slider-scripts-and-tutorials or from this one http://webdesignfan.com/jquery-slider-tutorials-and-plugins/ or search for jquery slider on google, as I did. hehe :). I use Nivo and it is very good but search again for this I found many others. I am going to try some of them.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜