次のコードがあり、最初のアラートで X が返されますが、if ブロックが起動しません。私は間違っていると確信しています...
$('.collectionofdates1>.datenumber').click(function(){
alert($(this).html());
if($(this).html() == "X"){
alert('asdf');
return false;
}
else{
$('.collectionofdates1 .datenumber').removeClass('selecteddate');
$(this).addClass('selecteddate');
}
});