jQuery TOOLSでタブ
準備
- ダウンロード
http://jquerytools.org/download/
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>jQuery Tools standalone demo</title> <!-- include the Tools --> <script src="js/jquery.tools.min.js"></script> <!-- standalone page styling (can be removed) --> <link rel="stylesheet" type="text/css" href="css/tools_style.css"> </head> <body><!-- the tabs --> <ul class="tabs"> <li><a href="#">タブ1</a></li> <li><a href="#">タブ2</a></li> <li><a href="#">タブ3</a></li> <li><a href="#">タブ4</a></li> <li><a href="#">タブ5</a></li> </ul> <!-- tab "panes" --> <div class="panes"> <div>タブ1の内容をここに</div> <div>タブ2の内容をここに</div> <div>タブ3の内容をここに</div> <div>タブ4の内容をここに</div> <div>タブ5の内容をここに</div> </div> <script> // perform JavaScript after the document is scriptable. $(function() { // setup ul.tabs to work as tabs for each div directly under div.panes $("ul.tabs").tabs("div.panes > div"); }); </script> </body> </html>