I can't get jScrollPane to work, for some reason?! :(

I can't get jScrollPane to work, for some reason?! :(

Oh, the frustration!

I have literally had the most frustrating morning ever. I've spent 4 and a half hours trying to get this to work.

The jQuery plugin in question is jScrollPane: http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html

My webpage is http://furnace.howcode.com - please just ignore the test data there during development ;)

So if you examine the source, you'll see this: 

  1.     jQuery(document).ready(function() {
  2.      $('#newesttab').addClass('selectedtab'); 
  3.      $('#col2').addClass('newestcol');
  4.      $("#ajaxresults").fadeOut("slow", function() {
  5.      $.ajax({
  6.      url: "<?php echo site_url('code/newest'); ?>",
  7.      success: function(msg) {
  8.      $('#ajaxresults').html(msg);
  9.      $("#ajaxresults").fadeIn("fast");
  10.      $('#col2').jScrollPane();
  11.      }
  12.      })
  13.      });

The line `$('#col2').jScrollPane();` is the line that's meant to make the jScrollPane trigger. It does... but, as you can see from the site, half of the div is cut off. I worked it out to be because #col2 has `margin-left: 160px` so it cuts off halfway. But, when I try to use a workaround, it breaks the rest of my page structure.

The second problem is that if I try and apply jScrollPane on any other div, I simply get no effect. I tried putting #col2 in a wrapper, `#col2wrapper` and applying it to that, but nothing at all worked. It's properly confusing.

If anyone can work this out, I will be so insanely pleased that I will give them a virtual high-five and other appreciative things.



    • Topic Participants

    • jack