I have a tabset that I with a couple of divs that are inside of the content area. I can get the main content div, but the other div gets a "display: none" style. Below is my code:
---------------------------
$(document).ready(function() {
$("#tabcontent div").hide(); // Initially hide all content
$("#tabs li:first").attr("id","current"); // Activate first tab
$("#tabcontent div:first").fadeIn(); // Show first tab content
$('#tabs a').click(function(e) {
e.preventDefault();
if ($(this).closest("li").attr("id") == "current"){ //detection for current tab
return
}
else{
$("#tabcontent div").hide(); //Hide all content
$("#tabs li").attr("id",""); //Reset id's
$(this).parent().attr("id","current"); // Activate this
$('#' + $(this).attr('name')).fadeIn(); // Show content for current tab
}
});
});
---------------------------
This is my html that displays the tabs and their content:
---------------------------
<div id="tabcontent">
<div id="tab1">
<div id="image">
<img alt="" src="/files/1713/6819/9436/man-suit.png" width="124" height="129" />
</div>
<p>Lorem Ipsum is simply dummy text of the printi typesetting industry. Lorem Ipsum has been the stry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type an scrambled it to make a type specimen book. It h survived not only five centuries, but also the lea
</p>
</div>
<div id="tab2">
<div id="image">
<img alt="" src="/files/1713/6819/9436/man-suit.png" width="124" height="129" />
</div>
<p>Lorem Ipsum is simply dummy text of the printi typesetting industry. Lorem Ipsum has been the stry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type an scrambled it to make a type specimen book. It h survived not only five centuries, but also the lea
</p>
</div>
<div id="tab3">
<div id="image">
<img alt="" src="/files/1713/6819/9436/man-suit.png" width="124" height="129" />
</div>
<p>Lorem Ipsum is simply dummy text of the printi typesetting industry. Lorem Ipsum has been the stry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type an scrambled it to make a type specimen book. It h survived not only five centuries, but also the lea
</p>
</div>
</div>
---------------------------
I can get the text to show up, but the #image div stays hidden. Any thoughts on how to display child elements of the divs?
Thanks!