Drupal 5 jscrollpane
I wanted a flashy scrollpane for the content on my drupal site.
I have drupal 5 where the scrollpane module is not available and I needed lightbox2 which required jquery_update module. Now the jscrollpane script clashed with compat.js of jquery_update module. So the solution for that is to download jscrollpane module for drupal 6. Take the jscrollpane.js file from this module and place it in your theme file.
To enable the jscrollpane use the following guidelines. I have implemented it manually.
In the page.tpl add the following css and javascript in the head:
<style type=”text/css” media=”all”>@import “<?php print base_path() . path_to_theme() ?>/styles/demoStyles.css”;</style>
<style type=”text/css” media=”all”>@import “<?php print base_path() . path_to_theme() ?>/styles/jScrollPane.css”;</style>
<script type=’text/javascript’ src=”<?php print base_path() . path_to_theme() ?>/scripts/jquery.mousewheel.js”></script>
<script type=’text/javascript’ src=”<?php print base_path() . path_to_theme() ?>/scripts/jScrollPane.js”></script>
<script type=”text/javascript”>
$(function()
{
// this initialises the demo scollpanes on the page.
$(’#pane3′).jScrollPane();
});
</script>
In the body put content inside div class=”scroll-pane” like the following:
<div id=”pane3″ class=”scroll-pane”>
<?php print $content; ?>
</div>
I got the stylesheets and scripts from jscrollpane official example link. And have used “#pane3″.