此页面为源码效果演示页面

点我返回此源码页面,登录后免费下载

源码:质感效果较强的手风琴导航效果源码

HoverAccordion

Example #1 - Menu

Just a plain unordered list with the id 'example1' in the <ul> tag. Each item contains a link to the same page, illustrating the autoactivate feature, where the item and according subitems are opened and highlighted automatically, if the link is identical with the current page. This is a default setting. See Example #2 for a regular accordion without links on the main items.

$(document).ready(function(){
   $('#example1').hoverAccordion();
});

 

For the purpose of this example, I added different numbers of subitems, in order to visualize how the height of the largest submenu determines how far each submenu opens up, so that there is little movement below. This can be turned off by setting the "keepheight" option to "false".

Example #2 - Regular Accordion

This time, we'll set custom options to emulate the accordion from the Apple website.

$(document).ready(function(){
   $('#example2').hoverAccordion({
      activateitem: '1',
      speed: 'fast'
   });
});