5
觸發兩次當我的/test/anycontent.phpjQuery UI的對話:與emebedded腳本標記問題
<div>
<h1>My title</h1>
<p>This is a paragraph</p>
<script type="text/javascript">
// alert("it seems that the presence of script tags is enough to trigger the problem");
</script>
</div>
的內容加載到jQuery UI的對話,結果是使用$。員額方法馬車, 並使用加載方法清理。
下面是測試用POST方法
$("#test").click(function(e){
$.post(url, {}, function(data){
$(data).dialog();
});
});
這裏用GET方法測試
$("#test").click(function(e){
$("<div></div>").load(url).dialog();
});
然後我的問題是,用POST方法, 我將有UI的2個實例-dialog !! 只有一個預期,另一個只是在第一個中間, ,它是空的和封閉的。
你知道爲什麼嗎? 你知道這個問題嗎?
注: 票已設置 http://bugs.jqueryui.com/ticket/6887
我一直在努力。對我來說,答案就在於那個jQuery bug。我需要從腳本標記中解析腳本,將它們刪除並直接將腳本應用到主體。 – 2011-07-26 08:04:51