jssor instance wordpress
ashinzekene opened this issue · comments
ashinzekene commented
Please how do I get access to the jssor instance on Wordpress?
jssor commented
just published jssor slider wordpress plugin 3.1.24.
jssor slider instance is accessible anywhere.
Thanks!
ashinzekene commented
Thanks.
I currently have this on my site
wp_jssor_3_slider_init = function () {
var wp_jssor_3_SlideshowTransitions = [];
var wp_jssor_3_options = {
$AutoPlay: 1,
$Idle: 7000,
$SlideDuration: 1000,
$SlideEasing: $Jease$.$InOutQuad,
$PauseOnHover: 3,
$SlideshowOptions: {
$Class: $JssorSlideshowRunner$,
$Transitions: wp_jssor_3_SlideshowTransitions,
$TransitionOrder: 1
}
};
var containerElement = document.getElementById("wp_jssor_3");
containerElement.removeAttribute("id");
var wp_jssor_3_slider = new $JssorSlider$(containerElement, wp_jssor_3_options);
/*responsive code begin*/
var MAX_WIDTH = 3000;
function ScaleSlider() {
var containerElement = wp_jssor_3_slider.$Elmt.parentNode;
var containerWidth = containerElement.clientWidth;
if (containerWidth) {
var expectedWidth = Math.min(MAX_WIDTH || containerWidth, containerWidth);
wp_jssor_3_slider.$ScaleWidth(expectedWidth);
} else {
window.setTimeout(ScaleSlider, 30);
}
}
ScaleSlider();
$Jssor$.$AddEvent(window, "load", ScaleSlider);
$Jssor$.$AddEvent(window, "resize", ScaleSlider);
$Jssor$.$AddEvent(window, "orientationchange", ScaleSlider);
/*responsive code end*/
};
I don't think it's assessible