Beruflich Dokumente
Kultur Dokumente
Objectives
Learn about how you can use jQuery to change Web page content and structure See how you can use jQuery animations to make a page come alive and enhance its usability Explore the jQuery UI library to add rich functionality to a pages user interface
Introduction
Once you know the basics of jQuery, there are many ways to put it to use Need to find a balance between using HTML/CSS and jQuery In general, to implement a design feature:
1. Use HTML when you can 2. If HTML cant do it, use CSS 3. If CSS cant do it, use jQuery
Design with progressive enhancement Well go beyond HTML and CSS here
Learn More @ http://www.learnnowonline.com
Copyright by Application Developers Training Company
When used to read content, get content only from first element in matched set When used to write content, affects all elements in the set
Methods
insertBefore and insertAfter methods prependTo and appendTo methods remove method
Hovering Effects
Commonly need to change appearance when mouse hovers over an element Several methods
mouseover and mouseout methods mousedown and mouseup methods mouseenter and mouseleave methods
Sample page
Mouse over row in table User clicks a row in table Button can toggle row click highlighting Button clears all click highlights
Learn More @ http://www.learnnowonline.com
Copyright by Application Developers Training Company
Forms of animate()
Pass a JavaScript object literal
.animate( properties, [duration], [easing], [complete] )
Limitations to animate()
Can only set single numeric CSS properties Doesnt support shorthand CSS properties Multiword property names must be camel cased
backgroundColor borderRight
Learn More!
This is an excerpt from a larger course. Visit www.learnnowonline.com for the full details! Learn more about jQuery on SlideShare!
The jQuery Library