i have 3 box and applying this function but problem is when click on first box tab then action all boxes. i want to only one box response on first box tab. How is possible? and sorry for English mistake enter image description here
$(document).ready(function(){
$("ul#tabs li").click(function(e){
if (!$(this).hasClass("active")) {
var tabNum = $(this).index();
var nthChild = tabNum+1;
$("ul#tabs li.active").removeClass("active");
$(this).addClass("active");
$("#tab .li.active").removeClass("active");
$("#tab .li:nth-child("+nthChild+")").addClass("active");
}
});
});