I have an issue with a mobile drop down menu where the links within the menu do not trigger and it just send the div back to hiding without going to page.
<div id="nav-mobile">
<a href="#"><img src="http://www.solostream.com/wp-content/themes/solostream/img/dropdown-menu-white.png" /></a>
<ul style="display: none;">
<li><a href="<?php echo home_url(); ?>">Home</a></li>
<li><a href="#">Memberships</a></li>
<li><a href="#">Platinum Membership</a></li>
<li><a href="#">Our Equipment</a></li>
<li><a href="#">Video Production</a></li>
<li id="last-child"><a href="#">Contact</a></li>
</ul>
</div>
<script>
$(document).ready(function() {
$('#nav-mobile ul').hide();
$('#nav-mobile').click(function(e) {
e.preventDefault();
$('#nav-mobile ul').slideToggle();
});
});
</script>
revome the e.preventDefault()
$('#nav-mobile').click(function(e) {
//e.preventDefault();
$('#nav-mobile ul').slideToggle();
});
look here to see the emulation: http://jsfiddle.net/m9bug6tk/2/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.