Template:Team:HokkaidoU Japan/LargeDropDown/JS

From 2014.igem.org

(Difference between revisions)
Line 5: Line 5:
   _gaq.push(['_setAccount', 'UA-7243260-2']);
   _gaq.push(['_setAccount', 'UA-7243260-2']);
   _gaq.push(['_trackPageview']);
   _gaq.push(['_trackPageview']);
-
 
-
 
-
 
Line 15: Line 12:
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
   })();
-
        $(function() {
+
 
-
var $menu = $('#ldd_menu');
+
$(function() {
-
                                var $child = $menu.children("li");
+
    var $menu = $('#ldd_menu');
-
                                var $number = $menu.children("li").index(this);
+
                    var $child = $menu.children("li");
-
$child.eq(number).hover(function(){
+
                    var $number = $child.index(this);
-
$child.find('.ldd_submenu').slideDown(300);
+
        $child.eq(number).hover(function(){
-
} ,function(){
+
  $child.find('.ldd_submenu').slideDown(300);
-
$child.find('.ldd_submenu').stop(true,true).hide();
+
} ,function(){  
-
});
+
                                          $child.find('.ldd_submenu').stop(true,true).hide();
 +
});
});
});
</script>
</script>
</html>
</html>

Revision as of 11:43, 5 October 2014