beginning jquery

13
BEGINNING JQUERY Dr. Chiang Dhruv Gairola (TA)

Upload: dhruvgairola

Post on 15-Jan-2015

289 views

Category:

Technology


0 download

DESCRIPTION

TA slides for jquery.

TRANSCRIPT

Page 1: Beginning jQuery

BEGINNING JQUERY

Dr. Chiang

Dhruv Gairola (TA)

Page 2: Beginning jQuery

Outline

What is jQuery? Why use jQuery? Examples.

AJAX DOM traversal Event handling

Upgrades. Other libraries. jQuery related products. Conclusion.

Page 3: Beginning jQuery

What is jQuery?

Javascript library. Released January 2006. Version 1.x and 2.x. 2.x does not work < IE9

Page 4: Beginning jQuery

Why use jQuery?

Less coding. Simplify event handling. Simplify AJAX. Simplify DOM traversal. Handling of cross browser issues. Popular and useful client frameworks

depend on jQuery e.g., Bootstrap, Ember.js Lot of plugins available. etc

Page 5: Beginning jQuery

Examples – AJAX.

Asynchronous Javascript and XML. XML not necessary, JSON also possible. Demo.

Page 6: Beginning jQuery

Examples – AJAX.

Page 7: Beginning jQuery

Examples – AJAX.

Page 8: Beginning jQuery

Examples – DOM traversal.

You can traverse the DOM tree pretty easily. Demo.

Page 9: Beginning jQuery

Examples – Event handling.

Bind listeners to your objects. Callbacks. Demo.

Page 10: Beginning jQuery

Upgrades.

Upgrading is essential part of jQuery. jQuery migrate plugin. Automated tests (e.g., Selenium) should

reveal problems. Manual correction thereafter.

Page 11: Beginning jQuery

Other libraries.

Mootools has more functionality. Some UI components included in core.

jQuery is easier to learn. Lot of jQuery plugins. Readable code. Chaining of methods. Good documentation.

Nice comparison : http://www.slideshare.net/jeresig/javascript-library-overview-presentation/

Page 12: Beginning jQuery

jQuery related products.

jQuery UI : Front end effects, widgets, themes, etc.

jQuery mobile : Front end framework. Demos.

Page 13: Beginning jQuery

Conclusion.

Useful framework. Very popular in industry. Lot of plugins. CDNs hosted jQuery code, so browser

loading time isn’t significantly hit.