/    Sign up×
Community /Pin to ProfileBookmark

jQuery Solution Needed

I have a box that appears on the right hand side of my site. As my viewers scroll past it I want it to come back into vision and hover at the top of the page. Basically I want the box to move as the viewer scrolls through the site. I am very familiar with javascript and jQuery, however I cannot think of a way to do this. Not helped by the fact that I haven’t really done work with javascript scrolling.

Thanks in Advance,

Ben

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Benji6996authorJan 12.2011 — An exact example of what I would like is on this page (The bar on the left):

http://myvue.com/cinemas/index.asp?SessionID=&cn=1&ci=58&ln=1
Copy linkTweet thisAlerts:
@mjaskJan 12.2011 — Can you try this by using css position fixed property for the div in which the box is.
Copy linkTweet thisAlerts:
@Benji6996authorJan 12.2011 — That would of course be the simplest solution but then the item is fixed in place. I want it to move to position as the page is scrolled. To be honest I have looked at it in more detail now and although it is possible with a little jQuery using the $(window).scroll, it is a lot more complicated than I made out as it would require pushing other boxes out of the way as it scrolls, and as the it is really not necessary there is no point in me writing the script to do it. But thank you anyway.
×

Success!

Help @Benji6996 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 5.5,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

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