Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Sticky Sidebar Issue

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #31594
    robotsex
    Member

    Hey everyone. I’ve successfully gotten the sticky sidebar from this demo (https://css-tricks.com/examples/ScrollingSidebar/) to work nicely.

    However, now that I’m building the fat footer, the further you scroll, the further the sidebar shoves the footer down. Not too sure at this point how to resolve it.

    here’s the link
    http://mic-check.ntunemedia.com/
    click on one of the blog posts and scroll to see what I mean.

    thanks in advance.

    RS

    #60917
    benh359
    Participant

    Matt Ward’s Contained Sticky Scoll plugin might solve your problem – http://blog.echoenduring.com/2010/11/15/freebie-contained-sticky-scroll-jquery-plugin/

    otherwise you could put in a condition that looks at where the footer is relative to the bottom of the browser window and once it’s in view then stop the sidebar from scrolling.

    #60919
    robotsex
    Member

    thanks for the response. could you point me in the right direction as far as a conditional statement goes? Not sure where to even begin looking.

    #60657
    benh359
    Participant

    it would probably be something like

    if (($('#footer_area').offset().top) <= ($(window).height()))

    haven't tried it though.

    #60640
    robotsex
    Member

    nvrmnd, I got it all resolved.

    #60372
    sliver37
    Member

    Hey robotsex, glad to hear you got it resolved.

    Mind posting the solution/method you used?

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.