Template:NavBar

From 2014.igem.org

(Difference between revisions)
m
m
Line 140: Line 140:
$(document).ready(function() {
$(document).ready(function() {
if (!!('ontouchstart' in window)){
if (!!('ontouchstart' in window)){
-
$('.dropToggle', this).click(function() {  
+
$('.dropToggle').click(function(e) {
-
$('.navDropMenu', this).stop(true,true).slideDown();
+
$('.navDropMenu').slideToggle(200);
 +
$('.dropToggle').toggleClass('active');
 +
e.stopPropagation();
 +
});
 +
$(document).click(function() {
 +
if ($('.navDropMenu').is(':visible')) {
 +
$('.navDropMenu', this).slideUp();
 +
$('.dropToggle').removeClass('active');
 +
}
});
});
-
$(document).click(function() {
 
-
$('.navDropMenu').stop(true,true).slideUp();
 
-
$('.dropToggle').removeClass('active');
 
-
});
 
}
}
});
});
</script>
</script>
<html>
<html>

Revision as of 15:16, 31 January 2014