• 社会生活
  • 美女图片
  • 头像图片
  • 图片大全
  • 微信头像QQ头像情侣头像女生头像
    此栏目暂无任何新增信息

    Copyright© 2019 万家灯火 版权所有 京ICP备05073345号-1

    //获取窗口高度 function getWindowHeight() { var windowHeight; if (window.innerHeight) windowHeight = window.innerHeight; else if ((document.body) && (document.body.clientHeight)) windowHeight = document.body.clientHeight; if (document.documentElement && document.documentElement.clientHeight && document.documentElement.clientWidth) { windowHeight = document.documentElement.clientHeight; } return windowHeight; } //将url参数转为对象 function UrlSearchToObj() { var obj = {}; var name,value; var str=location.href; //取得整个地址栏 var num=str.indexOf("?"); str=str.substr(num+1); //取得所有参数 var arr=str.split("&"); //各个参数放到数组里 for(var i=0;i < arr.length;i++){ num=arr[i].indexOf("="); if(num>0){ name=arr[i].substring(0,num); value=arr[i].substr(num+1); obj[name] = value; } } return obj; } (function documentReady(fn){ if(document.addEventListener) { document.addEventListener('DOMContentLoaded',function(){ document.removeEventListener('DOMContentLoaded',arguments.callee,false); fn(); }, false); }else if(document.attachEvent) { document.attachEvent('onreadystatechange',function(){ if(document.readyState==='complete') { document.detachEvent('onreadystatechange',arguments.callee); fn(); } }); } })(function () { var $one = function (elem) { return document.querySelector(elem); }; var windowHeight = getWindowHeight(); var content = $one('.list-content'); var foot = $one('.foot'); var sum = content.offsetTop + content.offsetHeight + foot.offsetHeight; if (windowHeight > sum) { var footMarginTop = windowHeight - (content.offsetTop + content.offsetHeight) - foot.offsetHeight; foot.style.marginTop = footMarginTop + 'px'; } setTimeout(function () { document.querySelector('.page-loading').remove(); }, 300); }); window.onload = function () { (function () { var originalSort = $('.child-sort.original'); var replicaSort = $('.child-sort.replica'); if (originalSort.find('.item').length > 7) { replicaSort.append(''); var more = replicaSort.find('.item.more'); more.before(originalSort.find('.item:lt(7)')); more.on('click', function () { var _this = $(this); if (_this.hasClass('open')) { originalSort.append(replicaSort.find('.item:gt(6):not(.item.more)')); more.removeClass('open') } else { if (originalSort.find('.item').length) { more.before(originalSort.find('.item:lt(7)')); if (!originalSort.find('.item').length) { more.addClass('open') } } } }); } else { replicaSort.append(originalSort.find('.item')); } })(); (function () { var searchObj = UrlSearchToObj(); $('.pagination .action:not(.disabled, .page-num)').on('click', function () { var search = ''; var _this = $(this); searchObj.pn = _this.data('pn'); $.each(Object.keys(searchObj), function (index, item) { index === 0 ? search += '?' : search += '&'; search += item + '=' + searchObj[item]; }); window.location.search = search; }); })(); }