- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › sticky button that stops at div
Hi,
I’ve created a fixed position button that locks to the left and follows scroll but I want it to stop scrolling before the contact form/footer appears. Ideally I’d love to solve the problem with CSS but can’t work out how. A quick search on google told me that I have to use some javascript. Taufik Nurrohman’s JS script seems to deal with this problem but I can’t work out how to make it work. [Here’s the codepen link](http://codepen.io/bbilander/full/diGjx “codepen link”). Any ideas?
Thanks in advance!
B
Like this is the only way I know of. Unless I’m missing something this is not possible with CSS. http://www.websitecodetutorials.com/code/jquery-plugins/sticky-js-position-fixed-at-certain-point-in-page-demo.php
Thanks PicnicTutorials but that link you’ve sent me doesn’t seem to have a “stop” point. I want the button to stick to the left until a certain point. Then I want it to stop. The javascript I’ve put in should do this but it doesn’t seem to work with the CSS semi-circle I’ve used. Perhaps I should try an img instead?
Try waypoint js to
$(‘yourfooter’).waypoint({
handler: function(direction) {
// do stuff to the circular thingy
},
offset:100%
});