The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

sticky button that stops at div

  • # July 14, 2013 at 8:47 am

    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]( “codepen link”). Any ideas?
    Thanks in advance!

    # July 14, 2013 at 10:45 am

    Like this is the only way I know of. Unless I’m missing something this is not possible with CSS.

    # July 14, 2013 at 6:53 pm

    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?

    # July 15, 2013 at 3:16 am

    Try waypoint js to

    handler: function(direction) {
    // do stuff to the circular thingy

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed