0
如何在使用滾動時關閉推式畫布菜單?或點擊它。滾動時關閉推式菜單
以下是HTML和Jquery。提前致謝!
$(document).ready(function() {
$menuLeft = $('.pushmenu-left');
$nav_list = $('#nav_list');
$nav_list.click(function() {
$(this).toggleClass('active');
$('.pushmenu-push').toggleClass('pushmenu-push-toright');
$menuLeft.toggleClass('pushmenu-open');
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<nav class="pushmenu pushmenu-left">
<div class="menu-primary-container">
<ul id="menu-primary" class="menu">
<li><a href="http://10.0.0.127:8888/page16-sass/">Home</a></li>
<li><a href="http://10.0.0.127:8888/page16-sass/creative/">Creative</a></li>
<li><a href="http://10.0.0.127:8888/page16-sass/online/">Online</a></li>
<li><a href="http://10.0.0.127:8888/page16-sass/print/">Print</a></li>
<li><a href="http://10.0.0.127:8888/page16-sass/the-studio/">The Studio</a></li>
<li><a href="http://10.0.0.127:8888/page16-sass/work/">Our Work</a></li>
<li><a href="http://10.0.0.127:8888/page16-sass/snippets/">Snippets</a></li>
<li><a href="http://10.0.0.127:8888/page16-sass/blog/">Blog</a></li>
<li><a href="http://10.0.0.127:8888/page16-sass/contact/">Get in touch</a></li>
</ul>
</div> \t \t
<div class="mobile-phone">01268 271 858</div>
</nav>
請問您能否分享所需的CSS。在這裏很容易重現這個問題。 – vijayP