Jslfl【软件开发技术笔记】

jquery-ui tabs记要

官方说明文档http://api.jqueryui.com/1.9/tabs/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//初始化并绑定activate事件
var tabs = $("#tabs").tabs({
    activate: function( event, ui ) {
       //得到当前激活(选择)标签的下标,从0开始
       var active = tabs.tabs( "option", "active" );
    }
});

//设置当前激活(选择)第2个标签
$("#tabs").tabs( "option", "active", 1 );


<div id="revision-tabs"  >
    <ul>
        <li><a href="#tabs-1">报表</a></li>
        <li><a href="#tabs-2">文档</a></li>
    </ul>
               
    <div id="tabs-1" style="padding: 5px;height:100%;">
        <iframe src="" id="repFrame" name="repFrame"frameborder="0"  border="0" marginwidth="0" marginheight="0" scrolling="auto"  style="width:100%;height:100%;"></iframe>
    </div>

    <div id="tabs-2" style="padding: 5px;height:100%;">
        <iframe src="" id="docFrame" name="docFrame"frameborder="0"  border="0" marginwidth="0" marginheight="0" scrolling="auto"  style="width:100%;height:100%;"></iframe>
    </div>
</div>

, , ,

Comments are currently closed.