in css, the visibility property affects the content inside the tag when displaying the properties of effects on a common tag, this means that if you apply display:none; , it will remove the entire tag, but visibility:hidden hides the contents inside this tag.
Since: visible is a jQuery selector, you can use opacity instead of visibility to hide the content inside the tag.
$('#myId').css('opacity','1'); $('#myId').css('opacity','0');
if you need to hide the whole tag, it is better to go with the display none
source share