开发者

JQuery UI Tabs -clear page

开发者 https://www.devze.com 2023-03-23 04:43 出处:网络
开发者_高级运维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 th
开发者_高级运维

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消