$(window).scroll(function() {
if ($(this).scrollTop() > 100) {
$('.scroll-top-wrapper').addClass('show'); //button show
} else {
$('.scroll-top-wrapper').removeClass('show'); //button hide
}
});
滚动顶部功能:
function scrollToTop() {
verticalOffset = typeof(verticalOffset) != 'undefined' ? verticalOffset : 0;
element = $('body');
offset = element.offset();
offsetTop = offset.top;
$('html, body').animate({
scrollTop: offsetTop
}, 500, 'linear');
}
巨大的弹出代码:
$(document).on('click', '#detailkp', function(event) {
popup.open({
items: {
src: base_url + 'ekp/detail'
},
type: 'ajax',
ajax: {
settings: {
data: {
'key': function() {
return $('#table-kp tr.success').attr('id')
}
},
type: 'POST'
}
},
closeOnContentClick: false,
closeOnBgClick: false,
enableEscapeKey: true
});
});
你可以在http://simponi-asn.info/ekp上试试 并将196204071981032002放入seacrh,然后单击详细信息按钮以运行模式