function ReInitializeCyclePlugin() {
var el = $("#id");
var eventobject = EVobject;
var IdToInitialize = $(eventobject.currentTarget).attr("id");
/* here first we are detaching the cycle plugin */
el.find("#" + IdToInitialize).cycle("destroy");
/* cycle plugin reinitializes here */
el.find("#" + IdToInitialize).cycle({
fx: $("#cyclescroll").val(),
easing: $("#cyclebounce").val(),
speed: 1000,
timeout: 2000
});
}
I just want to reinitialize the cycle plugin dynamically as per user given inputs, and I am attempting this through above code. But there is some problem and it does not work. It ‘destroys’ successfully but is not reinitializing. What’s the problems here?
Have you tried chaining them together? http://jsfiddle.net/lucuma/NTB4s/