开发者

Coffeescript Image switcher?

Can anyone give me an example of how to making an image switcher using coffeescript? I just have 3 开发者_如何学运维images I want to fade in and out, but I couldn't find any tutorials for this.

Thanks


There are plenty of good jQuery plugins for this, e.g. http://jquery.malsup.com/cycle/

With that plugin, you just put all of your <img> tags in a <div>—let's say it has the id images—and then you can simply write

$ ->
  $('#images').cycle fx: 'fade'
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜