Skip to content

Instantly share code, notes, and snippets.

@zainaali
Last active February 19, 2021 09:43
Show Gist options
  • Save zainaali/5fc3aa293b72bf033b7bcff09a4bace1 to your computer and use it in GitHub Desktop.
Save zainaali/5fc3aa293b72bf033b7bcff09a4bace1 to your computer and use it in GitHub Desktop.
Hide header on specific slide of Revolution Slider
<script>
var revapi = jQuery(document).ready(function() {
jQuery('#rev_slider_2_3').show().revolution({
waitForInit: true,
/* SLIDER SETTINGS CONTINUED */
});
});
// only start the slider once the entire window has loaded
revapi.on('revolution.slide.onchange', function(event, data) {
var get_id1 = data.currentslide[0]['id'];
console.log(get_id1);
if(get_id1 == "intro-video"){
jQuery(".et-l--header .et_pb_section").css('opacity', '0');
}
else{
jQuery(".et-l--header .et_pb_section").css('opacity', '1');
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment