Difference between revisions of "Template:Bielefeld-CeBiTec/Header"

Line 1: Line 1:
 
<html lang="en">
 
<html lang="en">
  <script>
+
 
  
 
      
 
      
      $(function(){
+
<!-- 3 level menu bar, by any chance? -->
$(".dropdown-menu > li > a.trigger").on("click",function(e){
+
<script type="text/javascript">
var current=$(this).next();
+
(function($){
var grandparent=$(this).parent().parent();
+
$(document).ready(function(){
if($(this).hasClass('left-caret')||$(this).hasClass('right-caret'))
+
$('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) {
$(this).toggleClass('right-caret left-caret');
+
event.preventDefault();  
grandparent.find('.left-caret').not(this).toggleClass('right-caret left-caret');
+
event.stopPropagation();  
grandparent.find(".sub-menu:visible").not(current).hide();
+
$(this).parent().siblings().removeClass('open');
current.toggle();
+
$(this).parent().toggleClass('open');
e.stopPropagation();
+
});
});
+
$(".dropdown-menu > li > a:not(.trigger)").on("click",function(){
+
var root=$(this).closest('.dropdown');
+
root.find('.left-caret').toggleClass('right-caret left-caret');
+
root.find('.sub-menu:visible').hide();
+
 
});
 
});
 
});
 
});
   
+
   
   
+
   
+
   
+
   
+
   
+
   
+
   
+
   
+
   
+
   
+
 
     </script>   
 
     </script>   
 
      
 
      

Revision as of 15:21, 15 September 2015

iGEM Bielefeld 2015