jQuery Accordion 中的 jScrollPane 可以工作,但不可见!
我正在使用以下插件。
jQuery 手风琴: http://jquery.bassistance.de/accordion/demo/
jScrollPane: // 无法发布第二个超链接
两者都工作正常,但我无法让 jScrollPane 在手风琴内部工作。
<div class="basic" style="float:left;" id="list1a"> <!-- Accordion -->
<a><p class="text" style="font-size:18px; color:#848484;">»NEWS</p></a>
<div class="content">
<div class="scroll-pane"> <!-- jScrollPane -->
<p style="font-size: 11px;">
Lorem ipsum dolor sit amet etc...
</p>
</div>
</div> <!-- And a few other elements -->
当我将 div.content 放在手风琴之外时,它可以正常工作。但在手风琴内部,滚动条是不可见的。它仍然在那里,我可以滚动它,我可以抓住它,但我看不到它。我可能认为当手风琴关闭后再次打开时我必须重新初始化滚动窗格,但它仍然可以正常工作,所以我现在猜测这是一个 CSS 问题?我对 Javascript 的经验并不丰富,但我可以想象它们会以某种方式发生冲突。
提前感谢您的帮助!
I'm using the following plugins.
jQuery accordion:
http://jquery.bassistance.de/accordion/demo/
jScrollPane:
// Can't post a second hyperlink
Both work correct, but I can't get jScrollPane to work inside the accordion.
<div class="basic" style="float:left;" id="list1a"> <!-- Accordion -->
<a><p class="text" style="font-size:18px; color:#848484;">»NEWS</p></a>
<div class="content">
<div class="scroll-pane"> <!-- jScrollPane -->
<p style="font-size: 11px;">
Lorem ipsum dolor sit amet etc...
</p>
</div>
</div> <!-- And a few other elements -->
When I place div.content outside of the accordion it works correctly. But inside the accordion the scrollbar is invisible. It's still there, I can scroll it, I can grab onto it, but I can't see it. I maybe thought I had to reinitialise the scrollpane when the accordion opens again after it has been closed, but it still works correctly so I'm now guessing it's a CSS problem? I'm not highly experienced with Javascript but I can image they clash somehow.
Thanks for your help in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
知道了!这确实是一个 CSS 问题。手风琴的背景颜色设置为白色,并且不知何故它与滚动窗格重叠。现在将其设置为透明,一切正常!
Got it! It was a CSS problem indeed. The background color of the accordion was set to white, and somehow it overlapped the scrollpane. Set it to transparant now, everything works fine!