Forked from n7studios/soliloquy-reload-click.php
Last active
August 29, 2015 14:24
-
-
Save ericakfranz/674e95837428291bf47a to your computer and use it in GitHub Desktop.
This file contains hidden or 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