December 2013
Intermediate to advanced
384 pages
9h 54m
English
$("#down").hide(); $("#up").on("click", function(){ $("#up, #down").toggle(); $("#leftNav").hide(); }); $("#down").on("click", function(){ $("#up, #down").toggle(); $("#leftNav").show(); });
A simple way of changing the look and feel of web pages is to toggle the visibility of elements. Hiding elements that are not necessary and then only showing them when they become necessary can save a lot of screen space that can be critical in a well-implemented web application.
You hide or show elements from JavaScript by setting the style.display property to "none" or to "". jQuery, in contrast, provides a much more elegant and extensible solution.
To display an element using jQuery, ...
Read now
Unlock full access