Created
September 27, 2016 00:12
-
-
Save JayHoltslander/26dd91fa15d113dfadd4cb886c39d558 to your computer and use it in GitHub Desktop.
Monarch Plugin Mod
This file contains 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 characters
// SHOW/HIDE SOCIAL MONARCH PLUGIN DEPENDING ON SCROLL POSITION | |
if( $(window).width() >= 1025) { // if above default responsive breakpoint | |
$(document).ready(function() { | |
$(".et_social_sidebar_networks").hide(); // hide initially | |
var topOfOthDiv = $(".content").offset().top - 390; // set div position | |
$(window).scroll(function() { | |
if($(window).scrollTop() > topOfOthDiv) { // scrolled below div? | |
$(".et_social_sidebar_networks").show(); // show | |
} | |
if($(window).scrollTop() < topOfOthDiv) { // scrolled above div? | |
$(".et_social_sidebar_networks").hide(); // hide | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment