JQuery Tools 在網站上提供非常詳細的文件與Demo可供參考,可以非常簡易的按照文件中

的指南進行開發動作,在這邊會將指南上的某些範例整理成檔案,提供方便使用的範例檔

案,而這次介紹的是Tabs,這個UI提供可切換的內容,方便使用者將不同主題內容分別置於

其中。

UI 效果:

2010-03-28_122653

程式碼:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/tabs.css" />
<script src="js/jquery-1.3.2.min.js"></script>
<script src="js/jquery.tools.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){   
    $("ul.tabs").tabs("div.panes > div");
});
</script>
<title>JQuery Tools Tab</title>
</head>
<body>
<div style="width:500px">

<ul class="tabs">
    <li><a href="#">Tab 1</a></li>
    <li><a href="#">Tab 2</a></li>
    <li><a href="#">Tab 3</a></li>
</ul>
<div class="panes">
    <div>內容 1</div>
    <div>內容 2</div>
    <div>內容 3</div>
</div>

</div>
</body>
</html>

 

範例檔下載:JQuery_Tools_Tabs.RAR

JQuery Tools:http://flowplayer.org/tools/index.html

arrow
arrow
    全站熱搜

    iammic 發表在 痞客邦 留言(0) 人氣()