2
我使用jquery ui tab加載一個HTML,在該HTML我有一個方法。我怎樣才能從JQuery的UI標籤是由AJAX加載這個方法
$("#tabs").tabs({
beforeLoad: function (event, ui) {
ui.jqXHR.error(function() {
ui.panel.html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo.");
});
ui.jqXHR.success(function() {
alertMe()
});
}
});
<div id="tabs" style="height: 100%">
<ul>
<li><a href="Map.html">Tab 1</a></li>
</ul>
</div>
在map.html中我有alertMe方法。這裏顯示alertMe是未定義的。