treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] JQuery Full Page Slider

  • Hi everyone,

    I want to make my website so that when I'm clicking on a menu link the scrolls the page in some direction, but not just to a particular section on a long page. Exactly like this:

    http://glamour.biz/
  • This could be achieved with the :target selector, absolute positioning and transitions.
    Using jQuery would yield better browser compatibility. You could simply bind some scripts to your navigation links that do some animated CSS positioning.
  • What I thought was wrapping all the content in page divs. So in that sense you are simply animating 2 divs at the same time. So when you click for example the about button in the menu, the
    gets animated upwards with a slide animation to display:none; and
    also gets animated upwards but from the bottom to reveal it's contents.

    Lol if that even makes sense :)
  • Do you mean .slideToggle()??
    http://jsfiddle.net/tovic/GLVxz/

    $(function() {
    $('button').click(function() {
    $('section').slideToggle('slow');
    });
    });
  • That is exactly it! :D Thank you so much!