DHTML Javascript DIV Scroll Sync Script?

S

sravkum

Hi,

I have tried many options for this, let me explain ma problem first

Think that we have got two Layers
<Div id="layer1"> with some horizontal scrolled content </div>
<Div id="layer1"> with some horizontal scrolled content (has same
content as the above) </div>

so there is an horizontal scroll in both the DIV's

so when I scroll any one of the DIV's automatically the other DIV
should also be scrolled according to the amount that the other one was
scrolled.....

kindly let me know is there any solution for this

thanks in advance
http://www.mavenarts.com
 
D

Dag Sunde

Hi,

I have tried many options for this, let me explain ma problem first

Think that we have got two Layers
<Div id="layer1"> with some horizontal scrolled content </div>
<Div id="layer1"> with some horizontal scrolled content (has same
content as the above) </div>

so there is an horizontal scroll in both the DIV's

so when I scroll any one of the DIV's automatically the other DIV
should also be scrolled according to the amount that the other one was
scrolled.....

kindly let me know is there any solution for this

All bets are off as long as the HTML is invalid!

The "id" attribute must be unique within a page. So no matter how
you have tried to make it work with JS, it won't know which div to
operate on...

Make sure your html validates first, when you have problems with
scripting...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top