Template:NavBar
From 2014.igem.org
(Difference between revisions)
m |
m |
||
Line 118: | Line 118: | ||
</li> | </li> | ||
<li> | <li> | ||
- | <a href="#">START to FINISH</a> | + | <a href="#" class="dropToggle">START to FINISH</a> |
<div class="navDropMenu"> | <div class="navDropMenu"> | ||
</html>{{Nav/StartToFinish}}<html> | </html>{{Nav/StartToFinish}}<html> | ||
Line 135: | Line 135: | ||
</nav> | </nav> | ||
</header> | </header> | ||
+ | |||
+ | <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | ||
+ | <script> | ||
+ | $(document).ready(function() { | ||
+ | if (!!('ontouchstart' in window)){ | ||
+ | $('.dropToggle').click(function(event) { | ||
+ | $('.navDropMenu').slideToggle(); | ||
+ | e.stopPropogation(); | ||
+ | }); | ||
+ | $(document).click(function() { | ||
+ | $('.navDropMenu').slideUp(); | ||
+ | }); | ||
+ | } | ||
+ | }); | ||
+ | </script> | ||
<html> | <html> |
Revision as of 14:44, 31 January 2014