show content on click on each item

DanDaMan

New Member
I have a list and i want to show content when i click on each item and hide the previous one. The only restriction is i have to use jquery 1.4.2\[code\]<ul class="list"><li>1</li><li>2</li><li>3</li></ul><div><div class="content">1.1</div><div class="content">1.2</div><div class="content">1.3</div></div>--script--$('.content').hide();$('#list li').live('click', function(){ $('.content').eq($(this).index()).show();});\[/code\]
 
Back
Top