-
Book Overview & Buying
-
Table Of Contents
Learning jQuery : Better Interaction Design and Web Development with Simple JavaScript Techniques
The abilities we’ve discussed in this chapter allow us to:
React to a user’s click on a page element with .bind() or .click() and change the styles used on the page
Use event context to perform different actions depending on the page element clicked, even when the handler is bound to several elements
Alternately expand and collapse a page element by using .toggle()
Highlight page elements under the mouse cursor by using .hover()
Influence which elements get to respond to an event with .stopPropagation() and .preventDefault()
Call .unbind() to remove an event handler we’re done with
Cause bound event handlers to execute with .trigger().
Taken together, we can use these capabilities to build quite interactive pages. In the next chapter, we’ll learn how to provide visual feedback to the user during these interactions.
Change the font size
Change margin width
Change background colour