December 2013
Intermediate to advanced
384 pages
9h 54m
English
$("#up").on("click", function(){ $("#photo").width($("#photo").width()*1.2); }); $("#down").on("click", function(){ $("#photo").width($("#photo").width()*.8); });
Another important aspect when dynamically working with HTML elements is the ability to get and change an element’s size. jQuery makes this simple using a set of methods attached to the jQuery object. Table 8.1 shows the methods provided by jQuery objects that allow you to get the height and width of an element.
Table 8.1 jQuery Object Methods to Get and Set the Element Size
Read now
Unlock full access