stubborn prolem with popular custom scrollbar

放肆的年华 提交于 2019-12-23 21:51:28

问题


code updated : http://mawk3y.net/test/brand.php?id=12

the original jquery plugin is here http://manos.malihu.gr/tuts/jquery_custom_scrollbar.html

$(".content1").mCustomScrollbar({
scrollButtons:{
enable:true
}
});
$("#contact_details").mCustomScrollbar({
scrollButtons:{
enable:true
}
});

.content1 is the div with the problem : custom scrollbar doesn't show up untill you resize the window or start firebug and contact_details is the div inside the first tab which is without any problem though both divs contain text only."


回答1:


The problem is your

$(window).load(function(){

is inside your

$(document).ready(function(e) {

Remove the document ready function if your going to have images inside this div. Otherwise Remove the window load function. You won't need both.




回答2:


Your inline CSS for the scroll bar within #content_11 has display:none set.

<div class="mCSB_scrollTools" style="position: absolute; display: none;"> ... </div>

When you re-size the page, the plug-in is overwriting that element, which makes it appear. By manually replacing display: none with display: block; in my browser, I can make the scroll bar appear (albeit in the wrong place).

Your functional div, #contact_details has display: block already.

<div class="mCSB_scrollTools" style="position: absolute; display: block;">...</div>


来源:https://stackoverflow.com/questions/14489518/stubborn-prolem-with-popular-custom-scrollbar

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!