开发者

gayadesign's slideContent:function(obj) not working

I have used http://www.gayadesign.com/diy/animated-tabbed-content-with-jquery/

ta开发者_开发知识库b control,

var TabbedContent = {
    init: function () {
        $(".tab_item").mouseover(function () {

            var background = $(this).parent().find(".moving_bg");

            $(background).stop().animate({
                left: $(this).position()['left']
            }, {
                duration: 300
            });

            TabbedContent.slideContent($(this));

        });
    },

    slideContent: function (obj) {

        var margin = $(obj).parent().parent().find(".slide_content").width();
        margin = margin * ($(obj).prevAll().size() - 1);
        margin = margin * -1;

        $(obj).parent().parent().find(".tabslider").stop().animate({
            marginLeft: margin + "px"
        }, {
            duration: 300
        });
    }
}

$(document).ready(function () {
    TabbedContent.init();
});

slideContent: function (obj) 

doesnt work, while mouseover works fine,

can you please help me out

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜