Just a quick question, can someone tell me where this is going wrong, I’m trying to toggle visibility of a class but I can’t restore its visibility. Hiding it is fine:
if($(".ball").is(':visible') == true) {
$(".ball").css({ 'visibility': 'hidden'});
} else {
$(".ball").css({ 'visibility': 'visible'});
}
I can’t use toggle as I need the class to remain but not be seen, toggle will mess with formatting.
Help would be great, thanks.
You can select all elements with the
ballclass and then determine where or not it is hidden: