Skip to content

Instantly share code, notes, and snippets.

@jrwarwick
Created April 16, 2021 17:12
Show Gist options
  • Save jrwarwick/684c98d906fee1aa21e51409a53653b9 to your computer and use it in GitHub Desktop.
Save jrwarwick/684c98d906fee1aa21e51409a53653b9 to your computer and use it in GitHub Desktop.
Simple partial collapse/condense of a Hero region in Oracle APEX
//prerequisite: assign a static ID to your hero region.
//gets offset and height for total displacement
var heroRegionStaticID = "#pageNavCards";
var bottomofpageNavCards = $(heroRegionStaticID).offset().top + $(heroRegionStaticID).outerHeight();
$(window).scroll(function(){
if($(window).scrollTop() > bottomofpageNavCards){
$("#t_Body_title h1").fadeOut();
$("#t_Body_title div.t-HeroRegion-col.t-HeroRegion-col--left").fadeOut();
}
else{ //obviously get rid of this once you have it working.
console.log("not there yet...");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment