Reputation: 229
I am totaly new to JQUERY and i have got a project in which i have to use JQUERY UI tabs i downloaded one UI tab and followed all the instructions that are listed on here my html code is:
<div id="tab">
<ul class="tabs">
<li><a href="#tabs-1">Tab1</a></li>
<li><a href="#tabs-2">Tab2</a></li>
<li><a href="#tabs-3">Tab3</a></li>
</ul>
<div class="tab-content" id="tabs1">Tab1</div>
<div class="tab-content" id="tabs2">Tab2</div>
<div class="tab-content" id="tabs3">Tab3</div> </div>
and my JQUERY function is :
<script type="text/javascript">
$(document).ready(function () {
$('#tab').tabs();
});
</script>
The problem is that when i run the page it shows the output as follows:
and i CAN NOT NAVIGATE WITH TABS... I will heighly appreciate your kind help in this regard
Thanks in advance and looking for your prompt help
Upvotes: 0
Views: 6259
Reputation: 5265
Rename the content div's to this, you for got the dash -
.
<div class="tab-content" id="tabs-1">Tab1</div>
<div class="tab-content" id="tabs-2">Tab2</div>
<div class="tab-content" id="tabs-3">Tab3</div>
Upvotes: 0
Reputation: 434596
The links in the tab buttons:
<li><a href="#tabs-1">Tab1</a></li>
<li><a href="#tabs-2">Tab2</a></li>
<li><a href="#tabs-3">Tab3</a></li>
need to match the id
attributes of the tabs. Your links use tabs-1
, tabs-2
, and tabs-3
but your tabs use tabs1
, tabs2
, and tabs3
.
Demo: http://jsfiddle.net/ambiguous/kbfjS/
Upvotes: 3