标签:ons item index function val log resize 调用 turn
$(function(){
$(window).on(‘resize‘,function(){
//1.窗口的框度
let clientW = $(window).width();
console.log("窗口的框度:",clientW);
//2.设置临界点
let isShowBigImage = clientW>=900;
//1.3 取所有item
let $allItems = $(‘#kq_list #tr-tbody tr‘);
console.log($allItems);
//1.4遍历
$allItems.each((index,item)=>{
console.log(item);
if(index==0){
//$allItems[index].remove();
}else{
//$allItems[index].show();
}
});
});
$(window).trigger(‘resize‘);
//前端验证表单
function formValidation(){
console.log("前端验证表单");
return true;
}
});
$(document).ready(function(){
$(‘#kq_list button‘).click(()=>{
let $allItems = $(‘#kq_list #tr-tbody tr‘);
$allItems.each((index,item)=>{
console.log(item);
if(index==0){
$allItems[index].remove();
}else{
$allItems[index].show();
}
});
});
});
// 一进来就调用:尾边上().trigger(‘resize‘);
//$(window).trigger(‘resize‘);
标签:ons item index function val log resize 调用 turn
原文地址:https://www.cnblogs.com/gzhbk/p/12516024.html