Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Monarch Plugin Mod
// 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
You can’t perform that action at this time.