Page 1 of 1

[SOLVED] scrollbar to a div, i must be missing something

Posted: Thu Sep 22, 2011 12:45 pm
by snowball
Hi guys,

I have a question regarding scrollbars...

I never used them before, but now I need a scrollbar and it doesnt work out..

I have a collection of images in a collumn, the only thing I need is for that content to be vertical scrollable so the page doesn't stretches out..

I tried several jquery scrollbars, overflow options in css, for over 2 days now...

There must be a simple solution, hope one can help me out here getting this work

Thanks in advance!

Re: scrollbar to a div, i must be missing something simple

Posted: Thu Sep 22, 2011 12:58 pm
by RonnyK
I used it, with jscrollpane.

See http://jscrollpane.kelvinluck.com/ for the logic.

Ronny

Re: scrollbar to a div, i must be missing something simple

Posted: Thu Sep 22, 2011 1:05 pm
by snowball
Thats exactly the site wich I am on, but I cannot get it to work :s

I have a lot of small images, wich all uses jqzoom, innerzoom and that works fine, but now I want to put al that content to be scrollable...

I tried the common way by using the jquery module and added the plugin and the script to load in the header...no result...next I tried this method : http://forum.cmsmadesimple.org/viewtopi ... 20&t=55717 also no results...

Gonna take a coffee and retry again :-(

Thanks for your quick reply!

Re: scrollbar to a div, i must be missing something simple

Posted: Thu Sep 22, 2011 1:14 pm
by RonnyK
I use it both on http://ronnyk.dyndns.org:8080/ah-bh/ and on http://ronnyk.dyndns.org:8080/ah-hhm/

I call...
<__script__ type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jq ... ery.min.js">
</__script>
<__script__ type="text/javascript" src="uploads/JQuery/jquery.mousewheel.js"></__script>
<__script__ type="text/javascript" src="uploads/JQuery/jquery.jscrollpane.min.js"></__script>
<__script__ type="text/javascript" id="sourcecode">
$(function()
{
$('#main').jScrollPane();
$('#sidebar').jScrollPane();
});
</__script>
there inside the head-area of the template, where the two divs that I want scrollable are put explicitly.

Make sure that you do NOT call jquery itself multiple times.

If you give me a link (or via PM) I can take a look at the site. If you want I can take a look in the backend as well.

Ronny

Re: scrollbar to a div, i must be missing something simple

Posted: Thu Sep 22, 2011 1:14 pm
by snowball
Thanks !!! I will take a look at your reply and try it over again, if it doesnt work I'll pm you!

Re: scrollbar to a div, i must be missing something simple

Posted: Thu Sep 22, 2011 1:15 pm
by RonnyK
You posted just after I did. Did you see the earlier remark?

Re: scrollbar to a div, i must be missing something simple

Posted: Thu Sep 22, 2011 1:36 pm
by snowball
Yep I noticed, thanks for that, I just did exactly what you showed me, but nothing happens...yet :s

Re: scrollbar to a div, i must be missing something simple

Posted: Thu Sep 22, 2011 7:36 pm
by snowball
Ok solved by great help of Ronny K.

Don't know how to describe exactly, but it works perfect! ;D

Re: [SOLVED] scrollbar to a div, i must be missing something

Posted: Sun Sep 25, 2011 9:39 pm
by spcherub
Just curious, why didn't you just set overflow:scroll (assuming you have set with and height) in the style for the div containing your images instead of using JS solutions?

S