I am having a challenge. I have 2 divs, one set to display:none; in the css when the page loads I have two corresponding links. When the user clicks on
divs
display:none;
Depending on your HTML structure
if something like this
link1 link2 div for link 1 div for link 2
then jQuery code would look like this
$('a').click(function(e){ $('div').eq($(this).index()).show(); $('div').not($('div').eq($(this).index()).hide(); });
http://jsfiddle.net/NXdyb/