4
我使用http://manos.malihu.gr/jquery-custom-content-scroller/的自定義滾動條。無法更新jQuery mCustomScrollbar
我在包含gridview的div上使用它。當一個新行添加到Gridview並超過大小時,不會顯示滾動條。
我有另一個問題有一個div內,我正在使用一個按鈕切換該div的顯示。
我無法更新滾動條
(function($) {
$(window).load(function() {
$("#rightFixed").mCustomScrollbar({
scrollInertia: 150,
autoHideScrollbar: true,
updateOnBrowserResize: true,
updateOnContentResize: true,
theme: "dark-2"
});
});
})(jQuery);
$(function() {
$("#showTax").click(function() {
$("#cartTaxDiv").slideToggle();
$(this).text($(this).text() == 'Show Tax' ? 'Hide Tax' : 'Show Tax');
$('#rightFixed').mCustomScrollbar("update");
});
});
一件事滾動條初始化事件是$(window).load
和按鈕單擊是$(document).ready
。
你能幫我嗎?
感謝您分享此內容。很多人沒有意識到分享你自己的解決方案的重要性和幫助。 +1 – Onimusha
另外,對我來說,它更好地作爲'$(「#mydiv」)。slideToggle(500,updateScrollbar);' – Onimusha