我想在对话框中显示一个 jQuery UI 选项卡,但它无缘无故地显示了我的 asp.net 应用程序的目录列表。它还改变了我页面的 css。这里发生了什么?
Javascript:
$("#editAddress").click(function () {
var personId = window.location.search.slice(1).split('=')[1];
//Use Get API to fill the form:
$.getJSON('/ipad/api/Address/' + personId, function (data) {
var tabs = $('#tabs');
$("#dialogAddress").empty().append(tabs);
$("#dialogAddress").dialog("open");
tabs.show();
tabs.tabs();
});
});
HTML:
<div id="tabs" style="display:none">
<ul>
<li><a href="#tabs-1">Tab 1</a></li>
</ul>
<div id="tabs-1">
<fieldset>
<label for="address1">
Address1:</label>
<input type="text" name="address1" id="address1" value="" />
<label for="city">
City:</label>
<input type="text" name="city" id="city" value="" />
<label for="country">
Country:</label>
<input type="text" name="country" id="country" value="" />
</fieldset>
</div>
</div>