$('.tab').click(function() {
$(this).unbind("click");
var classy = $(this).attr("class").split(" ").splice(-1);
var ihtml = $('.content.'+classy).html();
$('#holder').html(ihtml);
$('.tab').removeClass('highlight');
$(this).addClass('highlight');
$(this).unbind("click");
});
So in this code I have basically, a tabbed interface. When I click the tabs again the information in the #holder disappears. So what I would like to do is unbind clicks whenever the user clicks on the tab, and then bind it when they switch tabs. How can I integrate this into my code?
Thanks.