/    Sign up×
Community /Pin to ProfileBookmark

jQuery and scrolling

Hi,

i have 1 div with scrollbars and another div with a table inside.
when user scroll horizontal bar in div1 i want application to scroll the table header from the same amount of pixels and in the same direction.

i did not find anything under jQuery about that.. 🙁
1. how can i detect in which direction the scroll is done (to the right, or to the left) ?
2. how can i determine how many pixels this scrolling is about ?
3. how to scroll the table header (table tag or th tag) from the same amount of point ?

i found just scrollLeft for now and i’m not successful to use it 🙁
any help would be welcome.
thx

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@infinityspiralFeb 27.2009 — Are you looking to scroll to a particular location? If this is the case, this jquery plug will help you here:

http://flesler.blogspot.com/2007/10/jqueryscrollto.html
×

Success!

Help @alain spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...