I am working on the tabs page… I am trying to get the id’s of li from the loop and then hide it. the id’s is not found.
<ul>
<li id="Page1" class="tab"><a href="#">Page2</a></li>
<li id="Page2" class="tab"><a href="#">Page2</a></li>
</ul>
jquery code:
$(".tab").click(function() {
var thisclick = $(this).attr("id");
var links = $(this).parent();
$(links).each(function() {
$("#PG_" + $(this).attr("id") ).hide();
});
$("#PG_" + thisclick).show();
});
because the
linksvariable is a pointer to theulelement:change to this one may help you:
Also, you can use
OR