Template:Team:HokkaidoU Japan/LargeDropDown/JS

From 2014.igem.org

(Difference between revisions)
 
(42 intermediate revisions not shown)
Line 4: Line 4:
$(function() {
$(function() {
    var $menu = $('#ldd_menu');
    var $menu = $('#ldd_menu');
-
                     var $submenu = $(".ldd_submenu");
+
                     var $child  = $menu.children(".menu_button");
-
                     var $child = $menu.children('li');
+
                     $child.hover(function() {
-
                    var $number = $child.index($child);
+
                    var $number = $child.index(this);
-
        $child.eq($number).hover(function(){ alert($number);
+
-
  $submenu.eq($number).slideDown(300);
+
            $child.eq($number).find('.ldd_submenu').stop().slideDown(300);
} ,function(){  
} ,function(){  
-
                                           $submenu.stop(true,true).hide();
+
                                           $child.find('.ldd_submenu').stop(true).slideUp(300);
 +
 
});
});
});
});
 +
</script>
</script>
</html>
</html>

Latest revision as of 13:12, 17 October 2014