How we can hide a block of HTML code on a button click using jQuery?
The .hide()
method is used for hiding a particular element.
BY Best Interview Question ON 26 Jan 2019
Example
// With the element initially shown, we can hide it slowly:
$( "#clickme" ).click(function() {
$( "#book" ).hide( "slow", function() {
alert( "Animation done." );
});
});