Created
June 5, 2015 13:53
-
-
Save n7studios/b1069870bf1c7b89fb97 to your computer and use it in GitHub Desktop.
Soliloquy - Reload Soliloquy on Click
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
<?php | |
/** | |
* Plugin Name: Soliloquy - Reload Soliloquy on Click | |
* Plugin URI: http://soliloquywp.com | |
* Version: 1.0 | |
* Author: Tim Carr | |
* Author URI: http://www.n7studios.co.uk | |
* Description: Registers a click handler to reload Soliloquy layouts. Useful when a Soliloquy slider isn't visible on page load. | |
*/ | |
function soliloquy_reload( $data ) { | |
?> | |
jQuery('.su-tabs-nav > span').on('click', function(e) { | |
setTimeout(function(){ | |
soliloquy_slider['<?php echo $data['id']; ?>'].reloadSlider(); | |
}, 100); | |
}); | |
<?php | |
} | |
add_action( 'soliloquy_api_end_global', 'soliloquy_reload' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment