我一直在一个网站上工作,在该网站上,我的子网站中有页眉导航、页脚和侧边栏导航。为了便于维护,我将页眉和页脚放在使用 jquery 的页面上。
“标题”
`<script>
$.get("/assets/navigation.html", function(data){
$("#nav-placeholder").replaceWith(data);
});
</script> `
“页脚”
`<script>
$.get("/assets/navfoot.html", function(data){
$("#foot-placeholder").replaceWith(data);
});
</script>`
“侧边栏”
`<script>
$.get("/assets/offcanvas_ca.html", function(data){
$("#nav-side").replaceWith(data);
});
</script>-->`
我一直在尝试使用相同的概念放置具有推送功能的画布侧边栏,但是当呈现页面时,页面的内容会出现在菜单下方。我已经成功使用了画布外覆盖(菜单浮动在页面内容上)但是当我尝试使用推送(打开菜单时推送所有页面内容)导航侧边栏时它不起作用。
想法?
任何建议,将不胜感激。
谢谢