...
|
...
|
@@ -37,19 +37,32 @@ function hiddenTips($ele) { |
|
|
}
|
|
|
}
|
|
|
|
|
|
function isFlexSupport() {
|
|
|
var flex = document.createElement('p').style.flex,
|
|
|
webkitFlex = document.createElement('p').style.webkitFlex,
|
|
|
flexWrap = document.createElement('p').style.flexWrap;
|
|
|
|
|
|
if ((flex === '' || webkitFlex === '') && flexWrap === '') {
|
|
|
return true;
|
|
|
} else {
|
|
|
return false;
|
|
|
//function isFlexSupport() {
|
|
|
// var flex = document.createElement('p').style.flex,
|
|
|
// webkitFlex = document.createElement('p').style.webkitFlex,
|
|
|
// flexWrap = document.createElement('p').style.flexWrap;
|
|
|
//
|
|
|
// if ((flex === '' || webkitFlex === '') && flexWrap === '') {
|
|
|
// return true;
|
|
|
// } else {
|
|
|
// return false;
|
|
|
// }
|
|
|
//}
|
|
|
|
|
|
function wrapElements(selector, count) {
|
|
|
var elArr = null;
|
|
|
|
|
|
$(selector).each(function(idx, el) {
|
|
|
elArr = $(selector).slice(idx, idx + count);
|
|
|
|
|
|
if (elArr.length === count && idx % count === 0) {
|
|
|
$(elArr).wrapAll($('<div class="js-wraper"></div>'));
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function search() {
|
|
|
if (searching || end) {
|
|
|
return;
|
...
|
...
|
@@ -84,9 +97,10 @@ function search() { |
|
|
hiddenTips($('#size-swiper-container'));
|
|
|
hiddenTips($('#reference-swiper-container'));
|
|
|
|
|
|
if (!isFlexSupport()) {
|
|
|
$('.detail .column').removeClass('column').addClass('oldbox');
|
|
|
}
|
|
|
//if (!isFlexSupport()) {
|
|
|
// $('.detail .column').removeClass('column').addClass('oldbox');
|
|
|
//}
|
|
|
wrapElements('.detail .column', 2);
|
|
|
searching = false;
|
|
|
end = true;
|
|
|
loading.hideLoadingMask();
|
...
|
...
|
|