<a href="#tab1">Tab1</a>
<div id="tab1">content</a>
...
var a = $(this).attr('href');
$(a).show();
This works but only if the container has an ID since the anchor link starts with "#", how do I make it work with a class, so that it recognized <div class="tab1">content</a>
?
Many thanks
jsFiddle.
If your a regex'r (I wouldn't use it here, however), you could use...
jsFiddle.