Does anyone know how to write the following in a neater, one line format? I'm sure it's possible but can't get very far with it.
if($('#myDiv').hasClass('hidden')){
$('#myDiv').toggleClass('shown hidden');
}
Basically to only perform a toggle in one direction.
Many thanks,
Tom.