Return to Snippet

Revision: 37061
at December 3, 2010 04:26 by delineo


Initial Code
<script type='text/javascript'>
$(document).ready(function(){

$("div.tab").click(function () {  

$(".contentOn").removeClass("contentOn");  

$(this).addClass("contentOn");  

$(".content").hide();  

var content_show = $(this).parent("li").attr("title");  
$("#"+content_show).show();  

});

});

</script>

<div id='newsContainer'><ul id='tabs'>
<li title='pnlNews1'><div id='btnTab1' title='' class='tab'>News</div></li>
<li title='pnlNews2'><div id='btnTab2' title='' class='tab'>Events</div></li>
<li title='pnlNews3'><div id='btnTab3' title='' class='tab'>Promotions</div></li></ul>

<div id='pnlNews1' class='content contentOn'>
<ul>Content</ul></div>

<div id='pnlNews2' class='content'>
<ul>Content</ul></div>

<div id='pnlNews3' class='content'>
<ul>Content</ul</div></div>

Initial URL

                                

Initial Description

                                

Initial Title
Horizontal Tabbed Container

Initial Tags

                                

Initial Language
jQuery