$(element).hide() // sets display: none
$(element).show() // sets display to original value
$(element).toggle() // toggles between the two
$(element).is(':visible') // returns true or false
$('element:visible') // matches all elements that are visible
$...
Simple toggle() case
function toggleBasic() {
$(".target1").toggle();
}
With specific duration
function toggleDuration() {
$(".target2").toggle("slow"); // A millisecond duration value is also acceptable
}
...and callback
function toggleCallback() {
...