javascript - tab menu error in body of html -


the body of html follows:

<body> <div class="container"> <ul class="tabs">     <li><a href="#tab1">description</a></li>     <li><a href="#tab2">specs</a></li> </ul> <div class="pane">     <div id="tab1">         <h2>hello</h2>         <p>hello hello hello.</p>         <p>goodbye goodbye, goodbye</p>     </div>     <div id="tab2" style="display:none;">         <h2>hello2</h2>         <p>hello2 hello2 hello2.</p>         <p>goodbye2 goodbye2, goodbye2</p>     </div> </div> <div class="content">this should appear on new line.</div> </div>  </div> </body> 

and head part follows:

<head>  <meta charset="utf-8"> <title>edysis</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">       <link rel="stylesheet" href="/static/css/jquery-ui.css">       <script src="/static/js/jquery-1.9.1.js"></script>       <script src="/static/js/jquery-ui.js"></script>       <script>       $(document).ready(function() {         $("ul.tabs a").click(function() {              $(".pane div").hide();               $($(this).attr("href")).show();          });       })       </script>  <link href="http://themeclue.com/css/style.css" rel="stylesheet" media="screen"> <link href="http://fonts.googleapis.com/css?family=cabin:400,500,600,700|asap:400,700" rel="stylesheet" type="text/css"> <script type="text/javascript">  </script> <div class="navbar"> <div class="navbar-inner"> <div class="container"> <h1>edysis</h1> <div class="nav-collapse collapse"> <ul class="nav"> <li> <a href="home">home</a> </li> <li> <a href="free-themes">calender</a> </li> <li> <a href="new-themes">degree programs</a> </li> <li> <a href="popular">advising</a> </li> <li> <a href="signin">sign in</a> </li> <li> <a href="signup">sign up</a> </li> </ul> </div>  </div>  </div>  </div>  </head> 

everything looks fine except tab effect not seem work. tried this example here. please let me know error is.

you can start place following html in <head></head>

   ` <div class="navbar"> <div class="navbar-inner"> <div class="container"> <h1>edysis</h1> <div class="nav-collapse collapse"> <ul class="nav"> <li> ... </div>  </div> ` 

inside <body></body>

the example following requireds anchor tag directly inside li child of ul having class='tabs'

are sure you're following tutorial or else?!


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -