Home  >  Article  >  Web Front-end  >  Extend self-written UI navigation with jQuery_jquery

Extend self-written UI navigation with jQuery_jquery

WBOY
WBOYOriginal
2016-05-16 18:36:281440browse
Copy code The code is as follows:

(function($){
$.navs=function( ){
return $('#top_menu_bar > li').each(function(){
$(this).hover(
function(){
$( this).find( 'ul:eq(0)').show();
                                                                                                                                                                        
             }
            );
         }); The following is a common method:




Copy code


The code is as follows: $(this).find('ul:eq(0)').show();
                },
                                                                                                                        $(this). ').hide();
                                                                                                                         ; navs();
The ambition I had two years ago has finally come true today (oh, this is navigation, not tabs), and I feel a small sense of accomplishment!
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn