I have a set of containers that are loaded in JQuery UI tabs each time I click on a search button. What I want to do is to clear the whole tab before I load anything in that. I tired the following but it didn't work.
$("#tab1").html("");
$("#tab2").html("");
This is working for me:
<div id="tabs">
<ul>
<li><a style="font-size: small;" href="#tab1">T</a></li>
<li><a style="font-size: small;" href="#tab2">G</a></li>
</ul>
<div align="center" id="tab1">
<div id='ts'>
....</div>
</div>
</div>
<input id="Button1" type="button" value="button" onclick="ClearTabs()" />
<script >
$(function () {
$("#tabs").tabs();
});
function ClearTabs() {
$("#tab1").html("");
$("#tab2").html("");
}
</script>
精彩评论