How to first tab active? below my code

<html>
<body>
<script>
$(document).ready(function() {
$(“section.hideme”).hide();
$(“button.b”).click(function() {
var id = $(this).attr(“id”);
var sectionId = id.replace(“b”, “section”);
$(“section.hideme”).hide();
$(“section#” + sectionId).fadeIn(“slow”);
});
});
</script>
<button class=”b” id=”b1″>B1</button>
<button class=”b” id=”b2″>B2</button>
<button class=”b” id=”b3″>B3</button>
<hr/>
<section id=”section1″ class=”hideme”>
section1
</section>
<section id=”section2″ class=”hideme”>
section2
</section>
<section id=”section3″ class=”hideme”>
section3
</section>
</body>
</html>

Read more here:: How to first tab active? below my code

Leave a Reply

Your email address will not be published. Required fields are marked *