When ever I have more than one set of tabs on a page this plugin breaks and only the first set of tabs will work.
$.fn.tabs = function() {
var selector = this;
this.each(function() {
var obj = $(this);
$(obj.attr('href')).hide();
$(obj).click(function() {
$(selector).removeClass('selected');
$(selector).each(function(i, element) {
$($(element).attr('href')).hide();
});
$(this).addClass('selected');
$($(this).attr('href')).show();
return false;
});
});
$(this).show();
$(this).first().click();
};
JS Fiddle example showing it not working.
You need to call the tab groups individually like so
http://jsfiddle.net/GsDGJ/1/
Otherwise it assumes that ALL of the a links belong to the same tab group, and will show/hide accordingly