按类打开jQuery生成的对话时遇到问题。
当我点击按钮时没有任何反应。
在步骤2中,询问用户他们想要生成多少元素。在第3步,通过jQuery AJAX帖子,所有元素都是用PHP中的foreach
生成的。
data-"type"
不起作用。
问题是什么?
到目前为止我用过的代码: $ step3 [] =''; $ j = 0; foreach($ elems as $ key){ $ step3 [] ='< div class =“field half”> '$学家'。设置模式< / DIV> < div class =“editpattern” data - type =“'。$ j。'标题=” 模式配置器“”>
测试
< / DIV> < div class =“field half”> 强制性? “; $ J ++; } $ step3 [] ='
autoOpen: false,
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "explode",
duration: 1000
}
});
var typeid = $(this).data("type");
$( ".editpattern[data-type="+typeid+"]" ).dialog( "open" );
});';
}
}