mahsa.n
سه شنبه 16 اردیبهشت 1393, 01:46 صبح
سلام به همه دوستان
من یه صفحه دارم که درون یه آپدیت پنل هست و درون آپدیت پنل یه لیست که لیست رو توسط customscrollbar دارای اسکرول کردم
تا اینجا همه چیز مرتبه، مشکل اینجاست که اگر محتوای درون آپدیت پنل آپدیت بشه دیگه customscrollbar کار نمیکنه و اسکرول لیست به صورت اسکرول ویندوز نمایش داده میشه
<!-- custom scrollbar -->
<link href="styles/jquery.mCustomScrollbar-setting.css" rel="stylesheet" />
<script src="scripts/jquery.mCustomScrollbar.concat.min.js"></script>
<script>
(function ($) {
$(window).load(function () {
$("#divGrid").mCustomScrollbar({
set_width: false, /*optional element width: boolean, pixels, percentage*/
set_height: false, /*optional element height: boolean, pixels, percentage*/
horizontalScroll: false, /*scroll horizontally: boolean*/
scrollInertia: 950, /*scrolling inertia: integer (milliseconds)*/
mouseWheel: true, /*mousewheel support: boolean*/
mouseWheelPixels: "auto", /*mousewheel pixels amount: integer, "auto"*/
autoDraggerLength: true, /*auto-adjust scrollbar dragger length: boolean*/
autoHideScrollbar: false, /*auto-hide scrollbar when idle*/
scrollButtons: { /*scroll buttons*/
enable: false, /*scroll buttons support: boolean*/
scrollType: "continuous", /*scroll buttons scrolling type: "continuous", "pixels"*/
scrollSpeed: "auto", /*scroll buttons continuous scrolling speed: integer, "auto"*/
scrollAmount: 40 /*scroll buttons pixels scroll amount: integer (pixels)*/
},
advanced: {
updateOnBrowserResize: true, /*update scrollbars on browser resize (for layouts based on percentages): boolean*/
updateOnContentResize: false, /*auto-update scrollbars on content resize (for dynamic content): boolean*/
autoExpandHorizontalScroll: false, /*auto-expand width for horizontal scrolling: boolean*/
autoScrollOnFocus: true, /*auto-scroll on focused elements: boolean*/
normalizeMouseWheelDelta: false /*normalize mouse-wheel delta (-1/1)*/
},
contentTouchScroll: true, /*scrolling by touch-swipe content: boolean*/
callbacks: {
onScrollStart: function () { }, /*user custom callback function on scroll start event*/
onScroll: function () { }, /*user custom callback function on scroll event*/
onTotalScroll: function () { }, /*user custom callback function on scroll end reached event*/
onTotalScrollBack: function () { }, /*user custom callback function on scroll begin reached event*/
onTotalScrollOffset: 0, /*scroll end reached offset: integer (pixels)*/
onTotalScrollBackOffset: 0, /*scroll begin reached offset: integer (pixels)*/
whileScrolling: function () { } /*user custom callback function on scrolling event*/
},
theme: "dark" /*"light", "dark", "light-2", "dark-2", "light-thick", "dark-thick", "light-thin", "dark-thin"*/
});
});
})(jQuery);
</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ClientIDMode="Static">
<ContentTemplate>
<div id="divGrid">
لیست
</div>
</ContentTemplate>
</asp:UpdatePanel>
لطفا راهنمایی کنید، اگر سوالم نامفهومه بگید تا بیشتر توضیح بدم یا عکس بذارم
من یه صفحه دارم که درون یه آپدیت پنل هست و درون آپدیت پنل یه لیست که لیست رو توسط customscrollbar دارای اسکرول کردم
تا اینجا همه چیز مرتبه، مشکل اینجاست که اگر محتوای درون آپدیت پنل آپدیت بشه دیگه customscrollbar کار نمیکنه و اسکرول لیست به صورت اسکرول ویندوز نمایش داده میشه
<!-- custom scrollbar -->
<link href="styles/jquery.mCustomScrollbar-setting.css" rel="stylesheet" />
<script src="scripts/jquery.mCustomScrollbar.concat.min.js"></script>
<script>
(function ($) {
$(window).load(function () {
$("#divGrid").mCustomScrollbar({
set_width: false, /*optional element width: boolean, pixels, percentage*/
set_height: false, /*optional element height: boolean, pixels, percentage*/
horizontalScroll: false, /*scroll horizontally: boolean*/
scrollInertia: 950, /*scrolling inertia: integer (milliseconds)*/
mouseWheel: true, /*mousewheel support: boolean*/
mouseWheelPixels: "auto", /*mousewheel pixels amount: integer, "auto"*/
autoDraggerLength: true, /*auto-adjust scrollbar dragger length: boolean*/
autoHideScrollbar: false, /*auto-hide scrollbar when idle*/
scrollButtons: { /*scroll buttons*/
enable: false, /*scroll buttons support: boolean*/
scrollType: "continuous", /*scroll buttons scrolling type: "continuous", "pixels"*/
scrollSpeed: "auto", /*scroll buttons continuous scrolling speed: integer, "auto"*/
scrollAmount: 40 /*scroll buttons pixels scroll amount: integer (pixels)*/
},
advanced: {
updateOnBrowserResize: true, /*update scrollbars on browser resize (for layouts based on percentages): boolean*/
updateOnContentResize: false, /*auto-update scrollbars on content resize (for dynamic content): boolean*/
autoExpandHorizontalScroll: false, /*auto-expand width for horizontal scrolling: boolean*/
autoScrollOnFocus: true, /*auto-scroll on focused elements: boolean*/
normalizeMouseWheelDelta: false /*normalize mouse-wheel delta (-1/1)*/
},
contentTouchScroll: true, /*scrolling by touch-swipe content: boolean*/
callbacks: {
onScrollStart: function () { }, /*user custom callback function on scroll start event*/
onScroll: function () { }, /*user custom callback function on scroll event*/
onTotalScroll: function () { }, /*user custom callback function on scroll end reached event*/
onTotalScrollBack: function () { }, /*user custom callback function on scroll begin reached event*/
onTotalScrollOffset: 0, /*scroll end reached offset: integer (pixels)*/
onTotalScrollBackOffset: 0, /*scroll begin reached offset: integer (pixels)*/
whileScrolling: function () { } /*user custom callback function on scrolling event*/
},
theme: "dark" /*"light", "dark", "light-2", "dark-2", "light-thick", "dark-thick", "light-thin", "dark-thin"*/
});
});
})(jQuery);
</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ClientIDMode="Static">
<ContentTemplate>
<div id="divGrid">
لیست
</div>
</ContentTemplate>
</asp:UpdatePanel>
لطفا راهنمایی کنید، اگر سوالم نامفهومه بگید تا بیشتر توضیح بدم یا عکس بذارم