0
我與我希望禁用滾動,而datais通過Ajax加載的情況。禁用鼠標滾輪/或任何滾動jquery
我曾嘗試: -
jQuery.ajax({
type: 'POST',
url: '<?php echo get_site_url();?>/wp-admin/admin-ajax.php',
data: {
action: 'my_cat_page',
bar: bids,
price: pids,
catid: ids,
status: both,
area: zids,
cuis: cids,
noc: noc
},
beforeSend: function() {
jQuery('#TB_overlay').css('display', 'block');
jQuery(window).scroll().disable();
},
complete: function() {
jQuery('#TB_overlay').css('display', 'none');
jQuery("#right_search").html(html);
},
success: function (html) {
jQuery("#right_search").html(html);
jQuery(window).scroll().enable();
},
failure: function (html) {
jQuery("#right_search").html("Ajax Failure! Please try again.");
}
});
沒有運氣。
這很簡單,適用於所有情況我認爲,很好!但可以更具體取決於哪個Ajax請求 –
謝謝它的工作。 :) –
很高興幫助! –