84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
请问下,如何使用js去控制web组件通过js的方式去控制menu的open close
比如点击这个保温茶垫后,menu就隐藏
闭关修行中......
你可以通过offCanvas的方法关闭,demo。
offCanvas
javascriptvar $menuCanvas = $('.am-offcanvas'); // 判断下是否是你需要的节点 $menuCanvas.find('a').on('click', function() { $menuCanvas.offCanvas('close'); });
javascript
var $menuCanvas = $('.am-offcanvas'); // 判断下是否是你需要的节点 $menuCanvas.find('a').on('click', function() { $menuCanvas.offCanvas('close'); });
你可以通过
offCanvas
的方法关闭,demo。