Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dimsemenov
Created June 9, 2022 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimsemenov/bdb8b9aefadab975a679d71cc7e27b41 to your computer and use it in GitHub Desktop.
Save dimsemenov/bdb8b9aefadab975a679d71cc7e27b41 to your computer and use it in GitHub Desktop.
function rs_enter_fullscreen_on_slide_click() {
?>
$('.royalSlider').each(function() {
var slider = $(this).data('royalSlider');
// listen for slide click
slider.ev.on('rsSlideClick', function() {
// enter fullscreen mb_decode_numericentity
slider.enterFullscreen();
});
});
<?php
}
add_action('new_rs_after_js_init_code', 'rs_enter_fullscreen_on_slide_click');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment