offcanvas menu link broken

让人想犯罪 __ 提交于 2019-12-04 19:51:01

Right, I've written a small example for you which I've tested and works:

HTML:

<a id="test" href="#test" data-uk-smooth-scroll="">Item</a>

jQuery:

$('#test').on('click', function() { 
    $.UIkit.offcanvas.hide();
});

The above jQuery code, detects a click on the defined ID of the menu item and closes the offcanvas display. The anchor/scroll will then kick in.

Do note that as this is Joomla, you may have to perform a Template Override for the menu, which Yootheme have already done.

Hope this helps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!