Started

Selectors

Utilities

Animation

AJAX

CSS

Event

Manipulation

Cookie

String

Attributes

Data

Storage

Miscellaneous

$hide

Hidden a group of element.
$hide( element, duration, callback )
  1. element [object]
    The target element.
  2. duration (optional) [number]
    The duration of hide animation in milliseconds.
  3. callback (optional) [function]
    The callback function will be fired after the hide animation is completed.

Notes

This most common function to hide a or a group of element by setting their display value to none.

Example

HTML code
<div id="box1" class="box">This is  box 1</div>
<div id="box2" class="box">This is  box 2</div>
<div id="box3" class="box">This is  box 3</div>
<div id="box4" class="box">This is  box 4</div>
<button onclick="start_hide()">Hide all box</button>
CSS code
.box {
	width: 200px;
	height: 60px;
	font-size: 12px;
	background: #5599bb;
	padding: 10px;
	margin: 10px 0;
}
JavaScript code
function start_hide()
{
	$hide($("box1"));
	
	$hide($id("box2 box3 box4"), 500);
}
Demonstration
This is box 1
This is box 2
This is box 3
This is box 4