Template:Team:HokkaidoU Japan/LargeDropDown/JS

From 2014.igem.org

(Difference between revisions)
Line 20: Line 20:
*/
*/
var $menu = $('#ldd_menu');
var $menu = $('#ldd_menu');
-
                                 var $child = $menu.children("li").index();
+
                                 var $child = $menu.children("li");
-
+
                                var $num = $child.index();
-
/**
+
$child.eq(num).hover(function(){
-
* for each list element,
+
-
* we show the submenu when hovering and
+
-
* expand the span element (title) to 510px
+
-
*/
+
-
$menu.children("li").eq(child).hover(function(){
+
$child.find('.ldd_submenu').slideDown(300);
$child.find('.ldd_submenu').slideDown(300);
} ,function(){
} ,function(){

Revision as of 11:37, 5 October 2014