Online message
If you are interested in our products, please leave a message or contact the online customer.
");
var console = window.console || { log: function () {} };
var $images = $('.honor-list');
var $toggles = $('.docs-toggles');
var $buttons = $('.docs-buttons');
var handler = function (e) {
console.log(e.type);
};
var options = {
// inline: true,
url: 'data-original',
build: handler,
built: handler,
show: handler,
shown: handler,
hide: handler,
hidden: handler
};
function toggleButtons(mode) {
if (/modal|inline|none/.test(mode)) {
$buttons.
find('button[data-enable]').
prop('disabled', true).
filter('[data-enable*="' + mode + '"]').
prop('disabled', false);
}
}
//AJAX请求
if($(".honor-box").size()<13)
$(".loadmore").hide();
var page =2;
init();
$(".loadmore").click(function(){
$.ajax({
cache: false,
type:"get",
url:"/fyjz/honor/index.html"+"&page="+page,
beforeSend:function(){$(".loadmore").html("").removeClass("loadmore").addClass('load')},
success:function(result){
if($.trim(result)==""){
$(".load").hide();
return;
}
$(".honor-list").append(result);
if((($(".honor-box").size()-1)%12)!=0)
$(".load").hide();
else
$(".load").html("LOAD MORE").removeClass("load").addClass('loadmore');
page++;
}
});
});
function init() {
function toggleButtons(mode) {
if (/modal|inline|none/.test(mode)) {
$buttons.
find('button[data-enable]').
prop('disabled', true).
filter('[data-enable*="' + mode + '"]').
prop('disabled', false);
}
}
$images.on({
'build.viewer': handler,
'built.viewer': handler,
'show.viewer': handler,
'shown.viewer': handler,
'hide.viewer': handler,
'hidden.viewer': handler
}).viewer(options);
toggleButtons(options.inline ? 'inline' : 'modal');
}