懒人之家--可能是JS网页特效代码收集最全的懒站!

手机端左右侧边栏菜单js特效

作者/代码整理:  (转载请附加本文地址,带有“懒人原生”字样的谢绝转载) 发布日期:2017-11-14
手机端左右侧边栏菜单js特效,点击滑动展开左侧菜单与右侧菜单代码,可以在同一个页面设置多个侧边栏菜单插件。


js代码

<script type="text/javascript" src="dist/canvi.js"></script>
<script>
var t = new Canvi({
		content: ".js-canvi-content",
		isDebug: !1,
		navbar: ".myCanvasNav",
		openButton: ".js-canvi-open-button--left",
		position: "left",
		pushContent: !1,
		speed: "0.2s",
		width: "100vw",
		responsiveWidths: [ {
			breakpoint: "600px",
			width: "280px"
		}, {
			breakpoint: "1280px",
			width: "320px"
		}, {
			breakpoint: "1600px",
			width: "380px"
		} ]
	})
</script>
<script type="text/javascript">
	var canviRight = new Canvi({
		content: '.js-canvi-content',
		navbar: '.js-canvi-navbar--right',
		openButton: '.js-canvi-open-button--right',
		position: "right"
	});
</script>