Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Javascript scrolling window with tricky design.
Old 08-28-2009, 07:13 PM Javascript scrolling window with tricky design.
Junior Talker

Posts: 2
Name: Mikhael
Trades: 0
I've got a problem with scrolling pages.

The page I'm referring to is www.theatre-fencing.ru It has got a lot of image elements including ones with "position:fixed"

Main content is on a table under theese images and div's.

Trouble is that the only way I can scroll it is with a mouse wheel while hovering mouse over content (not over the fixed elements)

I'm trying to use javascript to scroll, but it doesn't work. It seems like anything.scrollBy(...) seems to have no visible effect.
(...).scroll(...) - no effect as well.

Can anyone tell me what am I doing wrong?
Rainboy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-29-2009, 02:24 PM Re: Javascript scrolling window with tricky design.
logic ali's Avatar
Super Talker

Posts: 104
Trades: 0
Quote:
Originally Posted by Rainboy View Post
It seems like anything.scrollBy(...) seems to have no visible effect.
(...).scroll(...) - no effect as well.
There is a visible effect - in the error console: "document.body.scrollBy is not a function"

Try window.scrollBy
logic ali is offline
Reply With Quote
View Public Profile
 
Old 08-29-2009, 07:55 PM Re: Javascript scrolling window with tricky design.
Junior Talker

Posts: 2
Name: Mikhael
Trades: 0
I've tried it. Still - no effect.
Rainboy is offline
Reply With Quote
View Public Profile
 
Old 08-29-2009, 09:05 PM Re: Javascript scrolling window with tricky design.
logic ali's Avatar
Super Talker

Posts: 104
Trades: 0
Quote:
Originally Posted by Rainboy View Post
I've tried it. Still - no effect.
window.scrollBy acts on the entire window and yours isn't scrollable. Presumably you want to scroll a particular div, in which case you must write to its scrollTop property:

Code:
var theDiv = document.getElementById('myDiv');
.
.
theDiv.scrollTop =  n+'px';
logic ali is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Javascript scrolling window with tricky design.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23097 seconds with 12 queries