Hi, using the Firebug console I'm trying to test whether this code is working:
$(window).bind("load", function() {
$('#tab1link').click(function() {
$('#tab2').hide();
$('#tab2').removeClass('selected');
$('#tab1').show();
$('#tab1').addClass('selected');
});
$('#tab2link').click(function() {
$('#tab1').hide();
$('#tab1').removeClass('selected');
$('#tab2').show();
$('#tab2').addClass('selected');
});
});
but this:
console.log($('#tab2').hasClass('selected'))
returns the error:
TypeError: $("#tab2").hasClass is not a function { message="$("#tab2").hasClass is not a function", more...}
Does anyone know why the above console command is incorrect? (Not a jQuery expert...)
Based on the link below, I think it should work... http://api.jquery.com/hasClass/
Thanks!