我的网络过滤器中有一个导航。主菜单工作正常,但子菜单 ul li 没有出现。如何启用它。谢谢你。
<div id="dl-menu" class="dl-menuwrapper">
<button class="dl-trigger">Open Menu</button>
<ul class="dl-menu">
<li><a href="#portfolio-filter" title="hosteleria" data-filter=".hosteleria">Hosteleria</a>
<ul class="dl-submenu">
<li><a href="#portfolio-filter" title="bar" data-filter=".bar">bar</a></li>
<li><a href="#portfolio-filter" title="cafeteria" data-filter=".cafeteria">cafeteria</a></li>
<li><a href="#portfolio-filter" title="discoteca" data-filter=".discoteca">discoteca</a></li>
<li><a href="#portfolio-filter" title="restaurante" data-filter=".restaurante">restaurante</a></li>
<li><a href="#portfolio-filter" title="pub"data-filter=".pub">pub</a></li>
</ul>
</li>
</div>
必须与投资组合的元素联系起来
$(文档).ready(函数(){
var $container = $('#portfolio-container')
// initialize Isotope
$container.isotope({
// options...
resizable: false, // disable normal resizing
layoutMode : 'fitRows',
itemSelector : '.element',
animationEngine : 'best-available',
// set columnWidth to a percentage of container width
masonry: { columnWidth: $container.width() / 5 }
});
// update columnWidth on window resize
$(window).smartresize(function(){
$container.isotope({
// update columnWidth to a percentage of container width
masonry: { columnWidth: $container.width() / 5 }
});
});
$container.imagesLoaded( function(){
$container.isotope({
// options...
});
});
$('#dl-menu a').click(function(){
var selector = $(this).attr('data-filter');
$container.isotope({ filter: selector });
return false;
});