JScrollPane

Permalink
I am using JScrollPane as a part of my theme. It works great on my main page type. The problem is I have another page type (full width) that also needs the JScrollPane.

I have put the refrerence to the div that needs te pane in the header.php file:

<script type="text/javascript" id="sourcecode">
         $(function()
         {
            $('#content_content_left').jScrollPane();
         });
      </script>


I am thinking to use a class instead. So I just add the class to all divs that needs the scroll.

I have a class that positions the content div. This class is the same for both page types, but when I try assigning the scroll to this class, it doesn¨t work. The css for the class is:

.holder_full {
   float: left;
   position: relative;
   top: 70px;
   left: 50px;
}


The div that the scroll is assigned to now has the css
#content_content_left {
   padding-right: 5px;
   width: 470px; 
   height: 470px; 
   text-align: left;
   overflow: auto;
}


The full width div is similar but without the padding and with a width of 670px.

Can I make a class that I can assign to the divs and that gives me a working scroll?

URL is: cellista.no/c5

The gallery is using the full width page type

djoniba
 
djoniba replied on at Permalink Reply
djoniba
Figured it out :)