Line 743: | Line 743: | ||
<body> | <body> | ||
+ | <script> | ||
+ | $(document).ready(window.onmouseover=function(e) { | ||
+ | var navig = e.target.className | ||
+ | navig = navig.split(" ")[0] | ||
+ | navig = navig + "-sub" | ||
+ | var current_sub_bar = document.getElementById(navig) | ||
+ | |||
+ | if (current_sub_bar !== null){ | ||
+ | var last_sub_bar = document.getElementsByClassName("active-sub") | ||
+ | console.log(current_sub_bar); | ||
+ | $(".active-sub").removeClass("active-sub"); | ||
+ | current_sub_bar.className = "active-sub"; | ||
+ | } | ||
+ | }); | ||
+ | </script> | ||
+ | |||
+ | |||
+ | |||
+ | |||
<!-- JQuery source: https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js--> | <!-- JQuery source: https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js--> | ||
<script type="text/javascript" src="https://2016.igem.org/Team:DTU-Denmark/jQuery-js?action=raw&ctype=text/javascript"></script> | <script type="text/javascript" src="https://2016.igem.org/Team:DTU-Denmark/jQuery-js?action=raw&ctype=text/javascript"></script> |
Revision as of 11:02, 4 August 2016