mui,css3 querySelector,appendChild,style.display,insertBefore

<script>
mui.init({
swipeBack:true //启用右滑关闭功能
});
window.addEventListener('toggle', function(event) {
if (event.target.id === 'M_Toggle') {
var isActive = event.detail.isActive;
var table = document.querySelector('.mui-table-view');
var card = document.querySelector('.mui-card');
if (isActive) {
card.appendChild(table);
card.style.display = '';
} else {
var content = document.querySelector('.mui-content');
content.insertBefore(table, card);
card.style.display = 'none';
}
}
});
</script>

  

上一篇:django book 阅读笔记


下一篇:PHP中输出缓冲