欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

jquery 取得其中一个子元素的索引 hover事件

shiping1 的头像
 $('.banner_page span').hover(function () {
                
                //clearInterval(int);
                var index = $(this).parent().find('span').index($(this));
                $(this).addClass('cur').siblings().removeClass('cur');
                if (!$list.is(':animated')) {
                    //$list.animate({ 'left': -index * width }, 300);
                    $('.banner_list').each(function(i){
                $(this).children('li').eq(index).siblings().hide();
                $(this).children('li').eq(index).fadeIn(1000);
            });
普通分类: