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
});
}
我只想根据用户给定的输入动态地重新初始化循环插件,我正在通过上面的代码进行尝试。但是有一些问题,它不起作用。它成功“销毁”但没有重新初始化。这里有什么问题?