I\'m searching for a jquery plugin that will bound text inside a scrollable box. Most of the scroll plugins are converting the browser scroll bar but I want to keep that as it i
If you need to dynamically do this to elements, just wrap the content in a <div>
with a special class:
CSS:
.scroll {
overflow: auto;
max-height: 100px;
}
JS:
$(document).ready(function() {
$('.elements_that_should_scroll').wrap($('<div>', {'class': 'scroll'}));
});
Demo: http://jsfiddle.net/nW7uH/
If not, just give those elements the class scroll
and it should work just fine without JS.
You really don't need jQuery for this. Just some CSS.
.Information{
height:100px;
overflow:auto;
}
If you have a genuine need for this plugin then make sure you're referencing jQuery correctly and the link to the plugin js file.
If you run the page in your browser do you get anything in the console window. Any errors.
EDIT: Added a JSFiddle
EDIT: Also be sure you're referencing the required assets:
jquery.uscrollbar.js
jquery.uscrollbar.css
Make sure you specify a fixed width and height for your container div, in your case, the div with the class Information. Add this to your CSS file.
.Information {
height: 300px;
width: 300px;
}