View Full Version : JS and Flexroll conflict

henry hayes
10-10-2011, 01:46 PM
Id like to control scrolling of two divs with one scrollbar as in this example here


At the same time i want to customize the scrollbar. Ive been using Flexcroll which work fine on a single div. But as soon as i insert flexcroll.js to head of document in the example, the sync of the two divs breaks and only the div with Flexcroll attached scrolls.

Anyone know how to solve this? You can find the code im using in the example or i can post.

I dont have to use Flexcroll, so if you know of any other application that can customize scrollbar and control scroll on two divs at the same time, id appreciate a link.

henry hayes
10-10-2011, 06:03 PM
Tried jScrollPane instead of Flexcroll. Same issue, the sync between divs breaks..

Any suggestions?

10-10-2011, 06:07 PM
conflicts normally arise when the function names are the same. Check that or just change the ones you use. I just put a name in front of them like 'sam_' so
function easyRider() becomes function sam_easyRider().

Logic Ali
10-10-2011, 06:53 PM
Flexscroll changes the HTML structure around the div, which means you're no longer actually scrolling the same div.

henry hayes
10-12-2011, 02:41 PM
Thx for responses. Solved issue by using jscrollpane and this code in head:

<script type="text/javascript">
$("#div2").bind('jsp-scroll-y', function(event, scrollPositionY) {