利用jquery实现鼠标点击切换导航菜单代码



35 139 47



特效描述:利用jquery实现 鼠标点击切换 导航菜单,利用jquery实现鼠标点击切换导航菜单代码

代码结构

1. 引入CSS

<link rel="stylesheet" href="css/flexinav.css" />
<link rel="stylesheet" href="css/scrollbars.css" />
<link rel="stylesheet" href="fonts/css/font-awesome.css">

2. 引入JS

<script src='js/scripts.js'></script>

3. HTML代码

<div id="preloader">
    <div id="status">&nbsp;</div>
</div>
<div class="container">
    <div id="flexinav1" class="flexinav flexinav_grey"><!-- BEGIN FLEXINAV -->
        <div class="flexinav_wrapper"><!-- Flexinav Container -->
            <ul class="flexinav_menu">
                <li class="flexinav_collapse"><span><i class="fa fa-bars"></i>Navigation</span></li>
                <li class="flexinav_logo"><a href="#"></a></li>
            </ul>
            <ul class="flexinav_menu flexinav_menu_right">
                <li><span><i class="fa fa-plus"></i>Fly-Outs</span>
                    <div class="flexinav_ddown flexinav_ddown_fly_out flexinav_ddown_240">
                        <ul class="dropdown_flyout flexinav_icons">
                            <li class="flyout_heading">Marketplaces</li>
                            <li><a href="#"><i class="fa fa-music"></i>Audiojungle</a></li>
                            <li class="dropdown_parent"><span><i class="fa fa-code"></i>Codecanyon</span>
                                <ul class="dropdown_flyout_level">
                                    <li><a href="#">Javascript</a></li>
                                    <li><a href="#">PHP Scripts</a></li>
                                    <li><a href="#">Wordpress</a></li>
                                    <li><a href="#">Plugins</a></li>
                                    <li><a href="#">CSS</a></li>
                                    <li><a href="#">HTML5</a></li>
                                    <li><a href="#">Mobile</a></li>
                                    <li><a href="#">Apps</a></li>
                                </ul>
                            </li>
                            <li class="dropdown_parent"><span><i class="fa fa-heart"></i>Themeforest</span>
                                <ul class="dropdown_flyout_level">
                                    <li><a href="#">Site Templates</a></li>
                                    <li><a href="#">Wordpress</a></li>
                                    <li><a href="#">CMS Themes</a></li>
                                    <li><a href="#">eCommerce</a></li>
                                    <li><a href="#">Blogging</a></li>
                                    <li><a href="#">Marketing</a></li>
                                    <li><a href="#">Forums</a></li>
                                    <li><a href="#">PSD Templates</a></li>
                                </ul>
                            </li>
                            <li><a href="#"><i class="fa fa-video-camera"></i>Videohive</a></li>
                            <li><a href="#"><i class="fa fa-magic"></i>Graphicriver</a></li>
                            <li><a href="#"><i class="fa fa-camera"></i>Photodune</a></li>
                            <li class="last"><a href="#"><i class="fa fa-star"></i>3Docean</a></li>
                        </ul>                       
                    </div>
                </li>
                <li><span><i class="fa fa-arrows-v"></i>Scrollbars</span>
                    <div class="flexinav_ddown_scroll flexinav_ddown flexinav_ddown_320">
                        <div class="colrow">
                            <div class="col12">
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro, ipsa ab illum natus earum eum officia dolor ipsam sed vel adipisci sapiente voluptas placeat consequuntur reiciendis aut cupiditate id fuga.</p>
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptates, obcaecati, sit, laboriosam, laborum id ex eos veritatis aspernatur nihil corporis optio nobis totam aut aliquid et adipisci inventore. Est, sunt, sit modi cum inventore laudantium possimus rem maiores asperiores aliquid ipsum quod saepe non sapiente tempora ducimus dignissimos consectetur doloremque nostrum sed nulla. Assumenda, hic fuga repellat velit adipisci modi.</p>
                                <img src="img/320x180.gif" alt="">
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Excepturi, perspiciatis nulla dolorum tenetur placeat corporis nesciunt. Porro, soluta, repellendus eius animi facere beatae minima velit numquam. Quod neque architecto repudiandae!</p>
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt, ipsum, vero, doloribus accusantium autem nisi voluptatum nobis natus perspiciatis animi amet soluta aliquam fugit hic velit quo dicta. Animi, dolor, at quibusdam quod quia atque.</p>
                            </div>                            
                        </div>
                    </div>
                </li>
                <li class="flexnav_mega"><span><i class="fa fa-bars"></i>Grid</span>
                    <div class="flexinav_ddown flexinav_ddown_full">
                        <div class="colrow">
                            <div class="col12">
                                <p class="coldemo">col12</p>
                            </div>
                        </div>
                        <div class="colrow">
                            <div class="col11">
                                <p class="coldemo">col11</p>
                            </div>
                            <div class="col1">
                                <p class="coldemo">col1</p>
                            </div>
                        </div>
                        <div class="colrow">
                            <div class="col10">
                                <p class="coldemo">col10</p>
                            </div>
                            <div class="col2">
                                <p class="coldemo">col2</p>
                            </div>
                        </div>
                        <div class="colrow">
                            <div class="col9">
                                <p class="coldemo">col9</p>
                            </div>
                            <div class="col3">
                                <p class="coldemo">col3</p>
                            </div>
                        </div>
                        <div class="colrow">
                            <div class="col8">
                                <p class="coldemo">col8</p>
                            </div>
                            <div class="col4">
                                <p class="coldemo">col4</p>
                            </div>
                        </div>
                        <div class="colrow">
                            <div class="col7">
                                <p class="coldemo">col7</p>
                            </div>
                            <div class="col5">
                                <p class="coldemo">col5</p>
                            </div>
                        </div>
                        <div class="colrow">
                            <div class="col6">
                                <p class="coldemo">col6</p>
                            </div>
                            <div class="col6">
                                <p class="coldemo">col6</p>
                            </div>
                        </div>
                        <div class="colrow">
                            <div class="col4">
                                <p class="coldemo">col4</p>
                            </div>
                            <div class="col4">
                                <p class="coldemo">col4</p>
                            </div>
                            <div class="col4">
                                <p class="coldemo">col4</p>
                            </div>
                        </div>
                        <div class="colrow">
                            <div class="col3">
                                <p class="coldemo">col3</p>
                            </div>
                            <div class="col3">
                                <p class="coldemo">col3</p>
                            </div>
                            <div class="col3">
                                <p class="coldemo">col3</p>
                            </div>
                            <div class="col3">
                                <p class="coldemo">col3</p>
                            </div>
                        </div>
                        <div class="colrow">
                            <div class="col2">
                                <p class="coldemo">col2</p>
                            </div>
                            <div class="col2">
                                <p class="coldemo">col2</p>
                            </div>
                            <div class="col2">
                                <p class="coldemo">col2</p>
                            </div>
                            <div class="col2">
                                <p class="coldemo">col2</p>
                            </div>
                            <div class="col2">
                                <p class="coldemo">col2</p>
                            </div>
                            <div class="col2">
                                <p class="coldemo">col2</p>
                            </div>
                        </div>
                        <div class="colrow">
                            <div class="col1">
                                <p class="coldemo">col1</p>
                            </div>
                            <div class="col1">
                                <p class="coldemo">col1</p>
                            </div>
                            <div class="col1">
                                <p class="coldemo">col1</p>
                            </div>
                            <div class="col1">
                                <p class="coldemo">col1</p>
                            </div>
                            <div class="col1">
                                <p class="coldemo">col1</p>
                            </div>
                            <div class="col1">
                                <p class="coldemo">col1</p>
                            </div>
                            <div class="col1">
                                <p class="coldemo">col1</p>
                            </div>
                            <div class="col1">
                                <p class="coldemo">col1</p>
                            </div>
                            <div class="col1">
                                <p class="coldemo">col1</p>
                            </div>
                            <div class="col1">
                                <p class="coldemo">col1</p>
                            </div>
                            <div class="col1">
                                <p class="coldemo">col1</p>
                            </div>
                            <div class="col1">
                                <p class="coldemo">col1</p>
                            </div>
                        </div>
                    </div>
                </li>
                <li class="flexnav_mega"><span><i class="fa fa-list-ul"></i>List</span>
                    <div class="flexinav_ddown flexinav_ddown_mega">
                        <div class="colrow">
                            <div class="col2">
                                <h3>Marketplaces</h3>
                                <ul>
                                    <li><a href="#">Codecanyon</a></li>
                                    <li><a href="#">Themeforest</a></li>
                                    <li><a href="#">Graphicriver</a></li>
                                    <li><a href="#">Videohive</a></li>
                                    <li><a href="#">Audiojungle</a></li>
                                </ul>
                            </div>
                            <div class="col2">
                                <h3>Tutorials</h3>
                                <ul>
                                    <li><a href="#">Psdtuts+</a></li>
                                    <li><a href="#">Nettuts+</a></li>
                                    <li><a href="#">Vectorstuts+</a></li>
                                    <li><a href="#">Webdesigntuts+</a></li>
                                    <li><a href="#">WPtuts+</a></li>
                                </ul>
                            </div>
                            <div class="col2">
                                <h3>Freelancing</h3>
                                <ul>
                                    <li><a href="#">Microlancer</a></li>
                                    <li><a href="#">Creaticca</a></li>
                                    <li><a href="#">Rockable&nbsp;Press</a></li>
                                    <li><a href="#">Envato</a></li>
                                    <li><a href="#">FreelanceSwitch</a></li>
                                </ul>
                            </div>
                            <div class="col2">
                                <h3>Graphics</h3>
                                <ul>
                                    <li><a href="#">Graphicriver</a></li>
                                    <li><a href="#">Videohive</a></li>
                                    <li><a href="#">Audiojungle</a></li>
                                    <li><a href="#">Codecanyon</a></li>
                                    <li><a href="#">Themeforest</a></li>
                                </ul>
                            </div>
                            <div class="col2">
                                <h3>Learning</h3>
                                <ul>
                                    <li><a href="#">Vectorstuts+</a></li>
                                    <li><a href="#">Webdesigntuts+</a></li>
                                    <li><a href="#">WPtuts+</a></li>
                                    <li><a href="#">Psdtuts+</a></li>
                                    <li><a href="#">Nettuts+</a></li>
                                </ul>
                            </div>
                            <div class="col2">
                                <h3>Network</h3>
                                <ul>
                                    <li><a href="#">Rockable&nbsp;Press</a></li>
                                    <li><a href="#">Envato</a></li>
                                    <li><a href="#">FreelanceSwitch</a></li>
                                    <li><a href="#">Microlancer</a></li>
                                    <li><a href="#">Creaticca</a></li>
                                </ul>
                            </div>
                        </div>
                        <div class="colrow">
                            <div class="col8">
                                <h3>Lorem ipsum dolor sit amet, consectetur</h3>
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iste, unde, deleniti est magnam deserunt quia quas impedit. Beatae, deserunt, dolores totam perferendis quam unde molestias a eveniet et quae quisquam minima enim vitae cumque laboriosam. Adipisci, deleniti, error, ratione, rem odio quo.</p>
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, unde ullam quia facere incidunt reprehenderit nobis! Similique, voluptatibus, quis amet eveniet deleniti soluta officia distinctio esse vel dolorum laborum nobis commodi nesciunt cupiditate nam.</p>
                            </div>
                            <div class="col4">
                                <div class="video_container">
                                    <iframe src="http://51qianduan.com/"></iframe>
                                </div>
                            </div>
                        </div>
                    </div>
                </li>
                <li><span><i class="fa fa-columns"></i>Texts</span>
                    <div class="flexinav_ddown flexinav_ddown_640 flexinav_ddown_right">
                        <div class="colrow">
                            <div class="col8">
                                <h2>Lorem ipsum dolor sit amet</h2>
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Totam, eaque corporis quod deserunt eligendi nisi quidem! Facere, earum, suscipit voluptates omnis modi quos quia eius officia quam ab iste vitae asperiores autem reiciendis fuga facilis quis excepturi reprehenderit quasi soluta accusantium deserunt quaerat culpa provident enim.</p>
                                <h2>Lorem ipsum dolor sit</h2>
                                <p>Tempora, delectus, incidunt voluptatum dignissimos doloribus exercitationem omnis tempore nostrum minima quo deleniti voluptate similique laborum repudiandae in qui et perferendis accusamus consequatur eaque optio esse explicabo inventore vel adipisci impedit rerum maxime aperiam officiis ?</p>
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio, aliquam, ea voluptas unde repudiandae natus dolorem repellat sint nobis nam labore voluptate nostrum sed quod quidem quibusdam eveniet error blanditiis nulla!</p>
                            </div>                            
                            <div class="col4">
                                <p class="greybox">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Totam, eaque corporis quod deserunt eligendi nisi quidem!</p>
                                <ul class="flexinav_icons">
                                    <li><a href="#"><i class="fa fa-gears"></i>Codecanyon</a></li>
                                    <li><a href="#"><i class="fa fa-heart"></i>Themeforest</a></li>
                                    <li><a href="#"><i class="fa fa-magic"></i>Graphicriver</a></li>
                                    <li><a href="#"><i class="fa fa-video-camera"></i>Videohive</a></li>
                                    <li><a href="#"><i class="fa fa-music"></i>Audiojungle</a></li>
                                </ul>
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Commodi, labore dignissimos ut placeat ex dicta ad soluta asperiores cum sit quisquam.</p>                            
                            </div>                            
                        </div>
                    </div>
                </li>
            </ul><!-- Flexinav -->
        </div><!-- Flexinav Container -->
    </div><!-- END FLEXINAV -->
</div>
<script type="text/javascript">
        $(window).load(function() { // makes sure the whole site is loaded
            $('#status').fadeOut(); // will first fade out the loading animation
            $('#preloader').delay(350).fadeOut('slow'); // will fade out the white DIV that covers the website.
            $('body').delay(350).css({'overflow':'visible'});
        })
</script>
<div style="text-align:center;clear:both">
</div>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: flash导航菜单 flash导航条 flash导航 flash菜单 flash下拉菜单 flash下拉导航菜单 导航切换 菜单切换 浮动菜单 浮动导航 收缩菜单 收缩导航 右键菜单 滑动导航菜单 滑动导航 滑动菜单 滚动导航菜单 滚动菜单 滚动导航 h5动画导航 h5动画菜单 html5动画导航 html5动画菜单 滚动切换 滚动条切换 滑动选项卡 滑动切换 滑动手风琴 选项卡切换 选项卡 切换 tab切换 页面切换 选项卡插件 切换插件 导航菜单 导航条 菜单栏 导航栏 分类导航 响应式导航条 响应式导航 导航切换 菜单切换 二级菜单 二级导航菜单 二级导航 下拉列表 下拉菜单 下拉导航 下拉导航菜单 下拉菜单导航 响应式下拉菜单 固定导航 固定菜单 导航菜单插件 导航插件 菜单插件

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到