开发者

jquery scrollers which works on mouse over not click for panel links

i'm looking for a scroller similar to jcarousel but one that changes panels on mouse over not click o开发者_JAVA百科f the external links

e.g

main nav = home - about - services

on mouse over of home scroll to home panel etc

anyone know of one i can download


You could use just jcarousel, it adds the next and previous icons and gives them a class jcarousel-next and jcarousel-prev, you could add a .mouseover(), check the icon hasn't been disabled by checking for the class jcarousel-next-disabled, then firing a .click() on the item you are hovering over.

$(document).ready(function(){
    $('#mycarousel').jcarousel();

    $('.jcarousel-next').mouseover(function(){
        if(!$(this).hasClass("jcarousel-next-disabled"))
            $(this).click();
    });

    $('.jcarousel-prev').mouseover(function(){
        if(!jQuery(this).hasClass("jcarousel-prev-disabled"))
            $(this).click();
    });
});

See a simple working example here


If what you are really after is panel's displaying data, like pages, there are lots of examples: Animated tabbed content with jQuery see it working here

Alternatively you could use the jQuery UI .tabs() and add a little switchery for the mouse over - it already supports animations, see an example

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜