Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
162
rated 0 times [  166] [ 4]  / answers: 1 / hits: 17134  / 13 Years ago, wed, november 2, 2011, 12:00:00

I am using jquery UI tabs and working pretty well and now I want to hide and show tabs with a click of button as shown below.



On each tab I have a button and when I click it it should hide the present tab and the rest tabs and should show me the next tab.(ie..If I am on tab-1 and If I click button it should show me the tab-2 and should hide 1,3 and 4 tabs) and similarly for 2,3,4 tabs.



This is what I mean ?



enter



So how do I do that?



Here is my code:
script:



<script>
$(function() {
$( #tabs ).tabs();
});
</script>


Css:



<style type=text/css>
#tabs { width: 700px; }
</style>


Tabs:



<div id=tabs>
<ul>
<li><a href=#tabs-1>TAB1</a></li>
<li><a href=#tabs-2>TAB2</a></li>
<li><a href=#tabs-3>TAB3</a></li>
<li><a href=#tabs-4>TAB4</a></li>
</ul>
<div id=tabs-1>
<p></p>
</div>
<div id=tabs-2>
<p></p>
</div>
<div id=tabs-3>
<p></p>
<p></p>
</div>
</div>

More From » jquery

 Answers
40
[#89327] Monday, October 31, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
byrondonavanc

Total Points: 675
Total Questions: 107
Total Answers: 105

Location: Peru
Member since Fri, Oct 14, 2022
2 Years ago
byrondonavanc questions
;