亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

用jQuery擴(kuò)展自寫(xiě)的 UI導(dǎo)航

 更新時(shí)間:2010年01月13日 22:58:04   作者:  
目前試了 jQuery 擴(kuò)展的編寫(xiě)有兩種。
復(fù)制代碼 代碼如下:

(function($){
    $.navs=function(){
        return $('#top_menu_bar > li').each(function(){
            $(this).hover(
                function(){
                    $(this).find('ul:eq(0)').show();
                },
                function(){
                    $(this).find('ul:eq(0)').hide();
                }
            );
        });
    };
})(jQuery);

上面是直接定義屬性。下面是種常見(jiàn)的方法:
復(fù)制代碼 代碼如下:

jQuery.extend({
    navs:function(){
        return $('#top_menu_bar > li').each(function(){
            $(this).hover(
                function(){
                    $(this).find('ul:eq(0)').show();
                },
                function(){
                    $(this).find('ul:eq(0)').hide();
                }
            );
        });
    }
});

調(diào)用測(cè)試下:
$.navs();
兩年前的野心今天終于實(shí)現(xiàn)了(噢,這是導(dǎo)航,不是頁(yè)簽(tabs)),小有成就感一把!

相關(guān)文章

最新評(píng)論