-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
jQuery 2.0 Development Cookbook
By :
jQuery allows developers to easily process user input and then update the page to reflect this input. The previous recipes of this chapter have looked at detecting changes on input values and clicks on various page elements. This recipe will help you to create a web page that will update a header element based on the title that has been selected from a drop-down menu.
Create a blank HTML document named recipe-4.html, with the latest version of the jQuery library downloaded and ready for use.
Using techniques similar to those you have learned in the previous recipes, perform the following steps to make changes to the DOM based on user interaction:
Add the following HTML code to recipe-4.html, which you have just created; don't forget to update the reference to the jQuery library. This HTML creates a basic HTML web page with a drop-down menu element, allowing the user to choose a number of titles. There is also a header element that...
Change the font size
Change margin width
Change background colour