How do you hide and show an element in jQuery?
<div id="box">Box</div>
$('#box').hide();
console.log($('#box').css('display'));
$('#box').show();
console.log($('#box').css('display'));
$('#box').toggle();
console.log($('#box').css('display'));
Console output
none
block
none
See jQuery Effects.
Learn more about the similar topics:
| Tutorials |
|---|
| No Content Found. |
| Exercises & Assignments |
|---|
| No Content Found. |
| Interview Questions & Answers |
|---|
| No Content Found. |