开发者

Live-updating jquery marquee

开发者 https://www.devze.com 2023-01-13 19:51 出处:网络
I\'m looking for a pseudo-marquee with jquery, looking like the one on the twitter home page. The ideal features would be :

I'm looking for a pseudo-marquee with jquery, looking like the one on the twitter home page. The ideal features would be :

  • Using an HTML list to work
  • Updating with Ajax开发者_如何学Python when less than X elements remains to display
  • Stopping on mouse over with callback

Does that exist somewhere, or should I just create it myself ? Thanks.


This is what ultimately worked for me:

 http://www.givainc.com/labs/marquee_jquery_plugin.cfm

When you want to update the list

  • elements, simply call the update function:

    $("#id").marquee("update")
    


    There are some great plugins for this, not necessarily using lists.

    There's also this one, which uses a sliding or fading effect...but could be tweaked into animating in another way. It can be used on lists.

    A plugin like jQuery Marquee will not carry out the Ajax for you, but it could be easily modified using other jQuery methods to update live.

    The biggest thing to remember here is that if you set up your Ajax on an interval and continually modify the marquee's source DOM elements in the Ajax callback, you can achieve this effect without having to make yourself too crazy.

  • 0

    精彩评论

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