-
-
Save incidunt/7de37a1ab3be89c106f8d9f2de626499 to your computer and use it in GitHub Desktop.
Revisions
-
srikat revised this gist
Feb 3, 2014 . 3 changed files with 30 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ add_action( 'wp_enqueue_scripts', 'enqueue_sticky_last_widget' ); function enqueue_sticky_last_widget() { wp_enqueue_style( 'animate', get_stylesheet_directory_uri() . '/css/animate.min.css' ); wp_enqueue_script( 'waypoints', get_stylesheet_directory_uri() . '/js/waypoints.min.js', array( 'jquery' ), '1.0.0' ); wp_enqueue_script( 'waypoints-init', get_stylesheet_directory_uri() .'/js/waypoints-init.js' , array( 'jquery', 'waypoints' ), '1.0.0' ); wp_enqueue_script( 'jquery-sticky', get_stylesheet_directory_uri() .'/js/jquery.sticky.js' , array( 'jquery' ), '1.0.0' ); wp_enqueue_script( 'jquery-sticky-init', get_stylesheet_directory_uri() .'/js/jquery.sticky.init.js' , array( 'jquery-sticky' ), '1.0.0' ); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ jQuery(document).ready(function($) { $(".sidebar-primary .widget:last-child").sticky({getWidthFrom: ".sidebar-primary .sticky-wrapper", className: "stuck"}); }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ /* Fading in last sidebar widget as it is scrolled to and making it fixed -----------------------------------------------------------------------------*/ .sidebar-primary .widget:last-child { filter: alpha(opacity=0); opacity: 0; /*animation-duration: 1.5s;*/ } .admin-bar .stuck .widget { top: 28px !important; /*top: 68px !important;*/ } -
srikat created this gist
Feb 3, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ jQuery(function($) { $('.sidebar-primary .widget:last-child').waypoint(function(direction) { if (direction == 'up') { $(this).removeClass( 'fadeIn' ).addClass( 'fadeOut' ); } else { $(this).removeClass('fadeOut').addClass( 'animated fadeIn' ); } }, { offset: '50%', }); });