jScroll Pane - Doesn't work, just removes HTML
I am using the jScrollPane plugin for jQuery. It said on the site that this is the correct place to get support for it.
The plugin is supposed to customize the scrollbar, but instead of doing what its supposed to, it erases the HTML in the scroll pane.
I intend on using it for multiple purposes but here is the code I'm currently trying to do:
The head of the page:
<LINK rel="stylesheet" type="text/css" href="CSS/[[WEBSITE NAME]].css">
<SCRIPT type="text/j开发者_如何学运维avascript" src="JS/jQuery.js"></SCRIPT>
<SCRIPT type="text/javascript" src="JS/jQueryjScrollPane.js"></SCRIPT>
Note: The scroll pane CSS is appended to the CSS file included in the head.
And here is the code the Javascript code:
<SCRIPT type="text/javascript">
<!--
$(function()
{
$('#Terms').jScrollPane();
});
-->
</SCRIPT>
And finally the code for the content that is changed:
<DIV class="Panel" align="left" style="height:20em;overflow-y:scroll" id="Terms">[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>
</DIV>
The code seems to remove all HTML from the content. I've also tested it with other tags and it does that as well.
I had the same problem. I just added an element (like a div) in the element selected by the scrollPane call.
eg:
<DIV class="Panel" align="left" style="height:20em;overflow-y:scroll" id="Terms">
<div class="inner-div">
[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>[[INSERT CONTENT HERE]]<br>
</div>
</DIV>
精彩评论