Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <style type="text/css">
- body {
- font-family:helvetica, arial, sans-serif;
- font-size:12px;
- line-height:24px;
- }
- ul.tabs {
- list-style:none;
- margin:0;
- padding:0;
- }
- ul.tabs li {
- float:left;
- line-height:28px;
- margin:0 1px 0;
- background-color:#f0f0f0;
- }
- ul.tabs li a {
- display:block;
- padding:0 8px;
- text-decoration:none;
- }
- ul.tabs li.active a {
- cursor:default;
- color:#fff;
- }
- ul.tabs li.active {
- background-color:#000;
- }
- .tabContent {
- display:none;
- padding:30px;
- border:1px solid #000;
- }
- .container {
- clear:both;
- }
- </style>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
- <script type="text/javascript">
- $(function() {
- $("ul.tabs>li>a").click(function() {
- var self = $(this);
- if(self.parent("li").is(".active")) return false;
- $("ul.tabs>li").removeClass("active");
- self.parent("li").addClass("active");
- $(".tabContent").stop(true, true);
- if($(".tabContent:visible, .tabContent:animated").length) {
- $(".tabContent:visible, .tabContent:animated").not(self).fadeOut(300, function() {
- $(".tabcontent[rel='" + self.attr("id") + "']").fadeIn(300);
- });
- } else {
- $(".tabcontent[rel='" + self.attr("id") + "']").fadeIn(300);
- }
- return false;
- });
- $("ul.tabs>li>a:first").trigger("click");
- });
- </script>
- </head>
- <body>
- <div class="container">
- <ul class="tabs">
- <li><a href="#" id="tab1">tab 1</a></li>
- <li><a href="#" id="tab2">tab 2</a></li>
- <li><a href="#" id="tab3">tab 3</a></li>
- </ul>
- </div>
- <div class="container">
- <div class="tabContent" rel="tab1"><p>"Did you see a man in the pit?" I said; but he made no answer to that. We became silent, and stood watching for a time side by side, deriving, I fancy, a certain comfort in one another's company. Then I shifted my position to a little knoll that gave me the advantage of a yard or more of elevation and when I looked for him presently he was walking towards Woking.</p></div>
- <div class="tabContent" rel="tab2"><p>'Ah, well! It means much the same thing,' said the Duchess, digging her sharp little chin into Alice's shoulder as she added, 'and the moral of THAT is—"Take care of the sense, and the sounds will take care of themselves."'</p></div>
- <div class="tabContent" rel="tab3"><p>At Andover, and later at Yale, I had pitched on winning ball teams. My speed and control must both have been above the ordinary, for I made such a record during my senior year at college that overtures were made to me in behalf of one of the great major-league teams; but in the tightest pitch that ever had confronted me in the past I had never been in such need for control as now.</p></div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement