Hey everyone,
I just pushed a new version of the plugin with a new action_hook for FX!
A step back, first. There’s a new shortcode attribute that you may want to use, as well. You can now define an ID to your slideshow in the shortcode using the ‘id’ attribute.
Ok, ID aside, you can now write custom FX for your slideshow using an action_hook. * this is a stop gap measure until I get the FX options working a little better *
So, here’s what I’m doing on the backend: I’m basically echoing out the custom FX function that you add to your functions.php:
– do_action( “add_anything_slider_FX”, $id );
– do_action( “add_anything_slider_FX_{$id}”, $id );
Here’s the format that you should follow.
– note You could use either of the add_action declarations. The first is generic and will target all of your slideshows. The second targets slideshow 42 specifically, where 42 is the ID you’ve defined in the id shortcode attribute… make sense?
add_action( ‘add_anything_slider_FX’, ‘my_fx’ );
add_action( ‘add_anything_slider_FX_42’, ‘my_fx’ );
function my_fx($id) {
echo "<script>
jQuery(function() {
jQuery('#slider-{$id}').anythingSliderFx({
'.panel img' : [ 'top', '500px', '', 'swing' ]
});
});
</script>";
}
I highly recommend copying and pasting this into your functions.php file to use as a starting point. Then, I recommend even more highly that you use Mottie’s FX Builder https://mottie.github.com/AnythingSlider-Fx-Builder/ to define your FX.
Better documentation coming soon. Hope this helps someone!
-J