Font Size Controller using jQuery
Introduction Download We web developers sometimes need to apply styles that have not been defined in a stylesheet or inline. For this jQuery offers .css() method for such occations. .css method acts as getter and setter. To get the style property, we simply pass the name of the property as a string like .css('fontSize') and to set the style property, .css() method provides two different ways: Way 1: Single Property .css('fontSize','14px') Way 2: Multiple Properties .css({ 'property1': 'value1', 'property-2': 'value2' }) Let's have a HTML Content that will consume this service. < body > < h1 > Font Size Controller </ h1 > < div id ="fontController"> < button id ="fontController-large"> Bigger </ button > < button id ="fontController-small"> Smaller </ button > </