jquery Menu Plugin Superfish use guide _jquery

Source: Internet
Author: User

Download Address: Http://plugins.jquery.com/project/Superfish

Document Description: http://users.tpg.com.au/j_birch/plugins/superfish/

Some characteristics and effects of Superfish:

Use pure CSS to achieve dynamic effects, cross-browser, support the worst browser IE6
You can set the Drop-down menu to automatically hide the time when the mouse leaves. The default is 800 milliseconds
Support Fade animation
Support for keyboard responses
Automatically add a hint arrow to a parent menu containing a submenu
Supports shadow effects, but requires good browser support, such as firefox,chrome ... The worst browser IE6 is free.
Optional callback JS function

Instructions for use

1, 1. First, introduce jquery and Superfish files to the page

<script src= "Jquery.js" type= "Text/javascript" ><!--mce:0--></script> <script src=
" Superfish.js "type=" Text/javascript "><!--mce:1--></script>

2, 2. Second, use the UL Li to do the menu content

<ul class= "Sf-menu" >
 <li><a href= "#aa" >menu item This is quite long</a></li>
 <li class= "Current" >
    <a href= "#ab" >menu item→</a>
<ul>
 <li class= "current" ><a href= "#" >menu item</a></li>
 <li><a href= "#aba" >menu item</a></li >
 <li><a href= "#abb" >menu item</a></li>
</ul>
</li>
< /ul>

3, finally, create the initialization menu and set the effect

  $ (document). Ready (function () {
  $ ("Ul.sf-menu"). Superfish ({
    hoverclass:  ' sfhover ',//when the mouse hovers over the class
    pathclass:   ' overidethistouse ',//Active class
    Pathlevels: 1,//    Menu Series
    delay:     800,    //Pull-down menu automatically hides the time when the mouse is left. The default is 800 milliseconds
    animation:   {opacity: ' Show '},///animation effect, referencing jquery's animated jquery ' s. Animate ()
    speed:     ' normal ',  ///animation speed, reference jquery's animated jquery ' s. Animate ()
    dropshadows:  true,   //shadow effect, off with ' false '
    OnInit: function    () {},  ///initialized callback function
    Onbeforeshow:function () {},//submenu display before callback function
    onshow: function    () {} ,//submenu display callback function
    onhide: function    () {}  //submenu hidden callback function
  }
 );

The above mentioned is the entire content of this article, I hope you can enjoy.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.