When I want to hide a HTML <div>
, I use the following JavaScript code:
var div = document.getElementById('myDiv');
div.style.visibility = "hidden";
div.style.display = "none";
What is the equivalent of that code in jQuery?
When I want to hide a HTML <div>
, I use the following JavaScript code:
var div = document.getElementById('myDiv');
div.style.visibility = "hidden";
div.style.display = "none";
What is the equivalent of that code in jQuery?
$('#myDiv').hide();
或
$('#myDiv').slideUp();
或
$('#myDiv').fadeOut();