Last active
August 29, 2015 14:01
-
-
Save tomhemsley/b5d7e27afaadb4e4030d to your computer and use it in GitHub Desktop.
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
/** | |
* INSTALLATION: this code should be pasted into your theme's functions.php file. | |
* | |
*/ | |
function metaslider_slide_change_callback($options, $slider_id, $settings) { | |
$options['after'][] = " | |
// debug | |
console.log("current slide: " + slider.currentSlide); | |
if (slider.currentSlide == 1) { | |
// do something | |
} | |
if (slider.currentSlide == 2) { | |
// do something | |
} | |
if (slider.currentSlide == 3) { | |
// do something | |
} | |
"; | |
return $options; | |
} | |
add_filter('metaslider_flex_slider_parameters', 'metaslider_slide_change_callback', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment