Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Javascript - Scroll Div Content

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

Harro

Established Member
Impact
1
Solved: Javascript - Scroll Div Content

I have been trying to get the content of a div to scroll by use of a link. Here is the closest I have got so far.

HTML:
<script language='javascript'>
  function move_up() {
	content.scrollTop += 10;
  }
  
  function move_down() {
    content.scrollTop -= 10;
  }
 </script>
(content is the div id)

...and calling the function from the link, this works in IE however it does not in FF. Anyone body know how to get this working in FF, or know of anyother ways to do this.

Thanks for any help you can give.
Harro ;)
 
Last edited:
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
If content is the ID, you should be doing document.getElementById('content').scrollTop
 
0
Close
What would I do without you, thanks again. ;)
Harro.
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back