Skip to content

Instantly share code, notes, and snippets.

@kbouw
Created July 18, 2015 05:34
Show Gist options
  • Save kbouw/b60a542ce3ad50c3885d to your computer and use it in GitHub Desktop.
Save kbouw/b60a542ce3ad50c3885d to your computer and use it in GitHub Desktop.

Revisions

  1. kbouw created this gist Jul 18, 2015.
    12 changes: 12 additions & 0 deletions app.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    $(window).scroll(function() {
    if ($(document).scrollTop() > 300) {
    $('nav').addClass('shrink');
    } else {
    $('nav').removeClass('shrink');
    }
    });
    $("#view-more").click(function() {
    $('html, body').animate({
    scrollTop: $(".features1").offset().top
    }, 1000);
    });