SlideShare a Scribd company logo
for Developers
Introduction Ralph Whitbeck jQuery Team Member, on the Evangelism team Co-authored O’Rielly’s “jQuery Cookbook” due out   end of year Senior Web Application Engineer  BrandLogic Corporation   ( http://brandlogic.com)  Blog: http://ralphwhitbeck.com Twitter: @RedWolves
We’re not in Kansas anymore!
Overview Who, what, where and why of jQuery Review Core jQuery Concepts jQuery API Overview jQuery plugins jQuery UI jQuery News Announcement
Who uses jQuery  35.36% of all sites that use JavaScript, use jQuery A little more then 1 out 5 sites (23.07%), use jQuery http://trends.builtwith.com/javascript/JQuery
Who uses jQuery  35% of all site that use JavaScript, use jQuery 1 out 5 sites, use jQuery http://trends.builtwith.com/javascript/JQuery
Who uses jQuery  35% of all site that use JavaScript, use jQuery 1 out 5 sites, use jQuery http://trends.builtwith.com/javascript/JQuery
What is jQuery?  jQuery is a JavaScript Library! Dealing with the DOM (e.g. selecting, creating, traversing, changing, etc.) JavaScript Events Animations Ajax interactions
What does that mean?
if (browserType == "ie")  document.poppedLayer =  eval('document.getElementById("HiddenDIV")');  else  document.poppedLayer =  eval('document.layers["HiddenDIV"]');  document.poppedLayer.style.visibility = "visible";  It means no more of this…
Using jQuery we can do this   jQuery(“#HiddenDiv”).show();
Using jQuery we can do this   jQuery (“#HiddenDIV”).show(); var $ = jQuery; $(“#HiddenDiv”).show(); jQuery function
Using jQuery we can do this   jQuery(“ #HiddenDIV ”).show(); jQuery Function jQuery Selector (CSS expression)
Using jQuery we can do this   jQuery(“#HiddenDIV”) .show(); jQuery Wrapped Set jQuery Function jQuery Selector (CSS expression)
Using jQuery we can do this   jQuery(“#HiddenDIV”). show() ; jQuery Wrapped Set jQuery Function jQuery Selector (CSS expression) jQuery Method
jQuery really is the “write less, do more” JavaScript Library!
Why use jQuery?  Helps us to simplify and speed up web development Allows us to avoid common headaches associated with cross-browser development Provides a large pool of plugins Large and active community Tested on 50 browsers, 11 platforms It’s for both developers and designers
Why use jQuery?  Helps us to simplify and speed up web development Allows us to avoid common headaches associated with cross-browser development Provides a large pool of plugins Large and active community Tested on 50 browsers, 11 platforms It’s for both developers and designers
Why use jQuery?  Helps us to simplify and speed up web development Allows us to avoid common headaches associated with cross-browser development Provides a large pool of plugins Large and active community Tested on 50 browsers, 11 platforms It’s for both developers and designers
Where to get jQuery Download the source from Github (moved last night) Or use a CDN Google Microsoft
Core jQuery Concepts Select Something, do something Create something, do something Chaining and Operating Demo’d  http://ejohn.org/apps/learn-jquery/ and http://ralphwhitbeck.com/talks/stackoverflowdevdays/createdosomething.html
jQuery API Overview Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities You can review Core Methods at: http://docs.jquery.com or http://api.jquery.com
jQuery Plugins     There are over 2200 plugins  Plugins extend jQuery’s functionality If you can’t find the functionality in a plugin, make your own! You can make a jQuery Plugin in six steps
Step 1. create a private scope for $ alias <!DOCTYPE html><html><body> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){ })(jQuery); </script></body></html> A jQuery plugin in 6 steps
Step 2. attach plugin to fn alias <!DOCTYPE html><html><body> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){  $.fn.loveNotHate = function(){ $(this).text($(this).text().replace(/hate/g,'love'));  };  })(jQuery); </script></body></html> A jQuery plugin in 6 steps
Step 2. attach plugin to fn alias <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){  $.fn.loveNotHate = function(){ $(this).text($(this).text().replace(/hate/g,'love'));  };  })(jQuery); jQuery('p').loveNotHate(); </script></body></html> A jQuery plugin in 6 steps
Step 3. add implicit iteration <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){  $.fn.loveNotHate = function(){  this.each(function(){ $(this).text($(this).text().replace(/hate/g,'love'));  });  };  })(jQuery); jQuery('p').loveNotHate(); </script></body></html> A jQuery plugin in 6 steps
Step 3. add implicit iteration <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){  $.fn.loveNotHate = function(){  this.each(function(){ $(this).text($(this).text().replace(/hate/g,'love'));  });  };  })(jQuery); jQuery('p').loveNotHate(); </script></body></html> A jQuery plugin in 6 steps
Step 4. enable chaining <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){  $.fn.loveNotHate = function(){  return  this.each(function(){ $(this).text($(this).text().replace(/hate/g,'love'));  });  };  })(jQuery); jQuery('p').loveNotHate(); </script></body></html> A jQuery plugin in 6 steps
Step 4. enable chaining <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){  $.fn.loveNotHate = function(){  return this.each(function(){ $(this).text($(this).text().replace(/hate/g,'love'));  });  };  })(jQuery); jQuery('p').loveNotHate() .hide() ; </script></body></html> A jQuery plugin in 6 steps
Step 5. add default options <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){  $.fn.loveNotHate = function(){  return this.each(function(){ $(this).text($(this).text().replace(/hate/g, $.fn.loveNotHate.defaultOptions.text ));  });  };  $.fn.loveNotHate.defaultOptions = {text:'love'}; })(jQuery); jQuery('p').loveNotHate(); </script></body></html> A jQuery plugin in 6 steps
Step 6. add custom options <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){  $.fn.loveNotHate = function(){  return this.each(function(){ $(this).text($(this).text().replace(/hate/g, $.fn.loveNotHate.defaultOptions.text));  });  };  $.fn.loveNotHate.defaultOptions = {text:'love'}; })(jQuery); jQuery('p').loveNotHate( {text:'love-love-love'} ); </script></body></html> A jQuery plugin in 6 steps
Step 6. add custom options <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){  $.fn.loveNotHate = function( customOptions ){  return this.each(function(){ $(this).text($(this).text().replace(/hate/g, $.fn.loveNotHate.defaultOptions.text));  });  };  $.fn.loveNotHate.defaultOptions = {text:'love'}; })(jQuery); jQuery('p').loveNotHate( {text:'love-love-love'} ); </script></body></html> A jQuery plugin in 6 steps
Step 6. add custom options <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){  $.fn.loveNotHate = function( customOptions ){  var options = $.extend({},$.fn.loveNotHate.defaultOptions, customOptions);  return this.each(function(){ $(this).text($(this).text().replace(/hate/g, $.fn.loveNotHate.defaultOptions.text));  });  };  $.fn.loveNotHate.defaultOptions = {text:'love'}; })(jQuery); jQuery('p').loveNotHate( {text:'love-love-love'} ); </script></body></html> A jQuery plugin in 6 steps
Step 6. add custom options <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){  $.fn.loveNotHate = function( customOptions ){  var options = $.extend({},$.fn.loveNotHate.defaultOptions, customOptions);  return this.each(function(){ $(this).text($(this).text().replace(/hate/g, options.text ));  });  };  $.fn.loveNotHate.defaultOptions = {text:'love'}; })(jQuery); jQuery('p').loveNotHate( {text:'love-love-love'} ); </script></body></html> A jQuery plugin in 6 steps
Plugins are simple, just follow the steps!
jQuery UI   Official jQuery Project Provides plugins that make user interface elements easy Contains: Interactions  (Draggable, Droppable, Resizable, Selectable & Sortable) Widgets  (Accordian, Datepicker, Dialog, Progressbar, Slider, Tabs) Effects  (AddClass, RemoveClass, Animate, Effects, etc.) Theming
What can jQuery & jQuery UI Produce? High school students from Spotswood High School Jamie Gilar John Cicolella Demo’d  http://www.jamie.strunex.net/homework/channel/ Also Demo’d  http://ralphwhitbeck.com/talks/stackoverflowdevdays/ui-createdosomething.html
jQuery News Four Conferences next year (online, San Francisco, London, and Boston) Revamped Plugin site (by EOY) jQuery Ownership transferred from John Resig to the Software Freedom Conservancy. jQuery 1.4 coming soon Much More, including…
Announcement
The Official jQuery Podcast jQuery Podcast Co-hosting with Elijah Manor Scheduled to release 1 st  Episode mid-November Similar in format to This Week in Tech Live streaming via  http://tinychat.com/jquerypodcast Twitter Account: @jQueryPodcast
The Official jQuery Podcast Interview key people in the jQuery Community First scheduled guest is John Resig Second scheduled guest is Richard D. Worth Hopefully Jeff and Joel in the future
Thank You Questions?

More Related Content

PPT
Intro to jQuery - LUGOR - Part 1
PPT
Intro to jQuery
KEY
SproutCore is Awesome - HTML5 Summer DevFest
PPT
Jqueryforbeginnersjqueryconference2009 090914063709 Phpapp02
PDF
Rails 3: Dashing to the Finish
PPTX
J Query Presentation
KEY
Writing your Third Plugin
PPTX
Getting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Intro to jQuery - LUGOR - Part 1
Intro to jQuery
SproutCore is Awesome - HTML5 Summer DevFest
Jqueryforbeginnersjqueryconference2009 090914063709 Phpapp02
Rails 3: Dashing to the Finish
J Query Presentation
Writing your Third Plugin
Getting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli

What's hot (20)

PPT
Wookie Meetup
PDF
The Art of AngularJS in 2015 - Angular Summit 2015
PDF
Djangoアプリのデプロイに関するプラクティス / Deploy django application
PPTX
J Query - Your First Steps
PPTX
React django
PDF
Writing Software not Code with Cucumber
PDF
Making your Angular.js Application accessible
PDF
Getting Started with Angular - Stormpath Webinar, January 2017
PDF
A Gentle Introduction to Angular Schematics - Angular SF 2019
PDF
greach 2014 marco vermeulen bdd using cucumber jvm and groovy
PDF
An easy guide to Plugin Development
ODP
Beginning WordPress Plugin Development
PDF
Building Single Page Apps with React.JS
PDF
Parse Apps with Ember.js
PDF
Django の認証処理実装パターン / Django Authentication Patterns
PDF
Reactive Type safe Webcomponents with skateJS
PDF
Ten practical ways to improve front-end performance
PPTX
JSConf US 2010
PDF
Introduction to VueJS & The WordPress REST API
PDF
Front End Development: The Important Parts
Wookie Meetup
The Art of AngularJS in 2015 - Angular Summit 2015
Djangoアプリのデプロイに関するプラクティス / Deploy django application
J Query - Your First Steps
React django
Writing Software not Code with Cucumber
Making your Angular.js Application accessible
Getting Started with Angular - Stormpath Webinar, January 2017
A Gentle Introduction to Angular Schematics - Angular SF 2019
greach 2014 marco vermeulen bdd using cucumber jvm and groovy
An easy guide to Plugin Development
Beginning WordPress Plugin Development
Building Single Page Apps with React.JS
Parse Apps with Ember.js
Django の認証処理実装パターン / Django Authentication Patterns
Reactive Type safe Webcomponents with skateJS
Ten practical ways to improve front-end performance
JSConf US 2010
Introduction to VueJS & The WordPress REST API
Front End Development: The Important Parts
Ad

Viewers also liked (20)

PPTX
Print ad porto
PPTX
The Sorting Machine Web Quest Rubric
PPTX
Presentation kaka
PPT
PDF
Replik tergugat-i-done
PDF
Mekanisme Evolusi 1 A ( Ch 22)
PPTX
Platyhelmithes
PDF
JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code
PDF
President's List Honors
PPT
Derechos de autor entrega
PPSX
Pertemuan ke 2 (perangkat keras)
PPT
Facebook Feature (Like,Unlike,Comment)
PDF
Дума и администрация о дорогах
DOCX
PKL_Report body
DOCX
Tec16grupo9 ide9610177 anexos1
PDF
Promoting your business flyer
DOC
Kt thn 4
KEY
Testing Your Sproutcore Presentation
PPTX
Chris Woolard, Ofcom, Preparing for change – what will drive future growth?
PPT
From GNETS to Home School
Print ad porto
The Sorting Machine Web Quest Rubric
Presentation kaka
Replik tergugat-i-done
Mekanisme Evolusi 1 A ( Ch 22)
Platyhelmithes
JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code
President's List Honors
Derechos de autor entrega
Pertemuan ke 2 (perangkat keras)
Facebook Feature (Like,Unlike,Comment)
Дума и администрация о дорогах
PKL_Report body
Tec16grupo9 ide9610177 anexos1
Promoting your business flyer
Kt thn 4
Testing Your Sproutcore Presentation
Chris Woolard, Ofcom, Preparing for change – what will drive future growth?
From GNETS to Home School
Ad

Similar to jQuery For Developers Stack Overflow Dev Days Toronto (20)

PPT
jQuery and_drupal
PPT
jQuery For Beginners - jQuery Conference 2009
PPT
PPTX
Intro to jQuery
PPT
Building Web Hack Interfaces
PPT
Rey Bango - HTML5: polyfills and shims
PPT
jQuery Presentation - Refresh Events
PPT
Eugene Andruszczenko: jQuery
KEY
Taking your Web App for a walk
PPT
jQuery Fundamentals
PPT
Cucumber Presentation Kiev Meet Up
PPT
Selenium and Cucumber Selenium Conf 2011
PPT
Web App Testing With Selenium
PPT
Jquery
PPTX
Extend sdk
PPT
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
ODP
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
PPTX
ODP
ActiveWeb: Chicago Java User Group Presentation
PPT
jQuery Tips Tricks Trivia
jQuery and_drupal
jQuery For Beginners - jQuery Conference 2009
Intro to jQuery
Building Web Hack Interfaces
Rey Bango - HTML5: polyfills and shims
jQuery Presentation - Refresh Events
Eugene Andruszczenko: jQuery
Taking your Web App for a walk
jQuery Fundamentals
Cucumber Presentation Kiev Meet Up
Selenium and Cucumber Selenium Conf 2011
Web App Testing With Selenium
Jquery
Extend sdk
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
ActiveWeb: Chicago Java User Group Presentation
jQuery Tips Tricks Trivia

Recently uploaded (20)

PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Sensors and Actuators in IoT Systems using pdf
PDF
Advanced IT Governance
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
cuic standard and advanced reporting.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Cloud computing and distributed systems.
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PPT
Teaching material agriculture food technology
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
NewMind AI Monthly Chronicles - July 2025
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
Spectral efficient network and resource selection model in 5G networks
Sensors and Actuators in IoT Systems using pdf
Advanced IT Governance
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
cuic standard and advanced reporting.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
NewMind AI Weekly Chronicles - August'25 Week I
“AI and Expert System Decision Support & Business Intelligence Systems”
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Cloud computing and distributed systems.
Chapter 3 Spatial Domain Image Processing.pdf
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
GamePlan Trading System Review: Professional Trader's Honest Take
Review of recent advances in non-invasive hemoglobin estimation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Teaching material agriculture food technology
CIFDAQ's Market Insight: SEC Turns Pro Crypto

jQuery For Developers Stack Overflow Dev Days Toronto

  • 2. Introduction Ralph Whitbeck jQuery Team Member, on the Evangelism team Co-authored O’Rielly’s “jQuery Cookbook” due out end of year Senior Web Application Engineer  BrandLogic Corporation ( http://brandlogic.com) Blog: http://ralphwhitbeck.com Twitter: @RedWolves
  • 3. We’re not in Kansas anymore!
  • 4. Overview Who, what, where and why of jQuery Review Core jQuery Concepts jQuery API Overview jQuery plugins jQuery UI jQuery News Announcement
  • 5. Who uses jQuery 35.36% of all sites that use JavaScript, use jQuery A little more then 1 out 5 sites (23.07%), use jQuery http://trends.builtwith.com/javascript/JQuery
  • 6. Who uses jQuery 35% of all site that use JavaScript, use jQuery 1 out 5 sites, use jQuery http://trends.builtwith.com/javascript/JQuery
  • 7. Who uses jQuery 35% of all site that use JavaScript, use jQuery 1 out 5 sites, use jQuery http://trends.builtwith.com/javascript/JQuery
  • 8. What is jQuery? jQuery is a JavaScript Library! Dealing with the DOM (e.g. selecting, creating, traversing, changing, etc.) JavaScript Events Animations Ajax interactions
  • 10. if (browserType == &quot;ie&quot;) document.poppedLayer = eval('document.getElementById(&quot;HiddenDIV&quot;)'); else document.poppedLayer = eval('document.layers[&quot;HiddenDIV&quot;]'); document.poppedLayer.style.visibility = &quot;visible&quot;; It means no more of this…
  • 11. Using jQuery we can do this   jQuery(“#HiddenDiv”).show();
  • 12. Using jQuery we can do this   jQuery (“#HiddenDIV”).show(); var $ = jQuery; $(“#HiddenDiv”).show(); jQuery function
  • 13. Using jQuery we can do this   jQuery(“ #HiddenDIV ”).show(); jQuery Function jQuery Selector (CSS expression)
  • 14. Using jQuery we can do this   jQuery(“#HiddenDIV”) .show(); jQuery Wrapped Set jQuery Function jQuery Selector (CSS expression)
  • 15. Using jQuery we can do this   jQuery(“#HiddenDIV”). show() ; jQuery Wrapped Set jQuery Function jQuery Selector (CSS expression) jQuery Method
  • 16. jQuery really is the “write less, do more” JavaScript Library!
  • 17. Why use jQuery? Helps us to simplify and speed up web development Allows us to avoid common headaches associated with cross-browser development Provides a large pool of plugins Large and active community Tested on 50 browsers, 11 platforms It’s for both developers and designers
  • 18. Why use jQuery? Helps us to simplify and speed up web development Allows us to avoid common headaches associated with cross-browser development Provides a large pool of plugins Large and active community Tested on 50 browsers, 11 platforms It’s for both developers and designers
  • 19. Why use jQuery? Helps us to simplify and speed up web development Allows us to avoid common headaches associated with cross-browser development Provides a large pool of plugins Large and active community Tested on 50 browsers, 11 platforms It’s for both developers and designers
  • 20. Where to get jQuery Download the source from Github (moved last night) Or use a CDN Google Microsoft
  • 21. Core jQuery Concepts Select Something, do something Create something, do something Chaining and Operating Demo’d http://ejohn.org/apps/learn-jquery/ and http://ralphwhitbeck.com/talks/stackoverflowdevdays/createdosomething.html
  • 22. jQuery API Overview Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities You can review Core Methods at: http://docs.jquery.com or http://api.jquery.com
  • 23. jQuery Plugins   There are over 2200 plugins Plugins extend jQuery’s functionality If you can’t find the functionality in a plugin, make your own! You can make a jQuery Plugin in six steps
  • 24. Step 1. create a private scope for $ alias <!DOCTYPE html><html><body> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){ })(jQuery); </script></body></html> A jQuery plugin in 6 steps
  • 25. Step 2. attach plugin to fn alias <!DOCTYPE html><html><body> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){ $.fn.loveNotHate = function(){ $(this).text($(this).text().replace(/hate/g,'love')); }; })(jQuery); </script></body></html> A jQuery plugin in 6 steps
  • 26. Step 2. attach plugin to fn alias <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){ $.fn.loveNotHate = function(){ $(this).text($(this).text().replace(/hate/g,'love')); }; })(jQuery); jQuery('p').loveNotHate(); </script></body></html> A jQuery plugin in 6 steps
  • 27. Step 3. add implicit iteration <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){ $.fn.loveNotHate = function(){ this.each(function(){ $(this).text($(this).text().replace(/hate/g,'love')); }); }; })(jQuery); jQuery('p').loveNotHate(); </script></body></html> A jQuery plugin in 6 steps
  • 28. Step 3. add implicit iteration <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){ $.fn.loveNotHate = function(){ this.each(function(){ $(this).text($(this).text().replace(/hate/g,'love')); }); }; })(jQuery); jQuery('p').loveNotHate(); </script></body></html> A jQuery plugin in 6 steps
  • 29. Step 4. enable chaining <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){ $.fn.loveNotHate = function(){ return this.each(function(){ $(this).text($(this).text().replace(/hate/g,'love')); }); }; })(jQuery); jQuery('p').loveNotHate(); </script></body></html> A jQuery plugin in 6 steps
  • 30. Step 4. enable chaining <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){ $.fn.loveNotHate = function(){ return this.each(function(){ $(this).text($(this).text().replace(/hate/g,'love')); }); }; })(jQuery); jQuery('p').loveNotHate() .hide() ; </script></body></html> A jQuery plugin in 6 steps
  • 31. Step 5. add default options <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){ $.fn.loveNotHate = function(){ return this.each(function(){ $(this).text($(this).text().replace(/hate/g, $.fn.loveNotHate.defaultOptions.text )); }); }; $.fn.loveNotHate.defaultOptions = {text:'love'}; })(jQuery); jQuery('p').loveNotHate(); </script></body></html> A jQuery plugin in 6 steps
  • 32. Step 6. add custom options <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){ $.fn.loveNotHate = function(){ return this.each(function(){ $(this).text($(this).text().replace(/hate/g, $.fn.loveNotHate.defaultOptions.text)); }); }; $.fn.loveNotHate.defaultOptions = {text:'love'}; })(jQuery); jQuery('p').loveNotHate( {text:'love-love-love'} ); </script></body></html> A jQuery plugin in 6 steps
  • 33. Step 6. add custom options <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){ $.fn.loveNotHate = function( customOptions ){ return this.each(function(){ $(this).text($(this).text().replace(/hate/g, $.fn.loveNotHate.defaultOptions.text)); }); }; $.fn.loveNotHate.defaultOptions = {text:'love'}; })(jQuery); jQuery('p').loveNotHate( {text:'love-love-love'} ); </script></body></html> A jQuery plugin in 6 steps
  • 34. Step 6. add custom options <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){ $.fn.loveNotHate = function( customOptions ){ var options = $.extend({},$.fn.loveNotHate.defaultOptions, customOptions); return this.each(function(){ $(this).text($(this).text().replace(/hate/g, $.fn.loveNotHate.defaultOptions.text)); }); }; $.fn.loveNotHate.defaultOptions = {text:'love'}; })(jQuery); jQuery('p').loveNotHate( {text:'love-love-love'} ); </script></body></html> A jQuery plugin in 6 steps
  • 35. Step 6. add custom options <!DOCTYPE html><html><body> <p>I hate jQuery!</p> <p>I mean really hate jQuery!</p> <script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;></script> <script> (function($){ $.fn.loveNotHate = function( customOptions ){ var options = $.extend({},$.fn.loveNotHate.defaultOptions, customOptions); return this.each(function(){ $(this).text($(this).text().replace(/hate/g, options.text )); }); }; $.fn.loveNotHate.defaultOptions = {text:'love'}; })(jQuery); jQuery('p').loveNotHate( {text:'love-love-love'} ); </script></body></html> A jQuery plugin in 6 steps
  • 36. Plugins are simple, just follow the steps!
  • 37. jQuery UI   Official jQuery Project Provides plugins that make user interface elements easy Contains: Interactions (Draggable, Droppable, Resizable, Selectable & Sortable) Widgets (Accordian, Datepicker, Dialog, Progressbar, Slider, Tabs) Effects (AddClass, RemoveClass, Animate, Effects, etc.) Theming
  • 38. What can jQuery & jQuery UI Produce? High school students from Spotswood High School Jamie Gilar John Cicolella Demo’d http://www.jamie.strunex.net/homework/channel/ Also Demo’d http://ralphwhitbeck.com/talks/stackoverflowdevdays/ui-createdosomething.html
  • 39. jQuery News Four Conferences next year (online, San Francisco, London, and Boston) Revamped Plugin site (by EOY) jQuery Ownership transferred from John Resig to the Software Freedom Conservancy. jQuery 1.4 coming soon Much More, including…
  • 41. The Official jQuery Podcast jQuery Podcast Co-hosting with Elijah Manor Scheduled to release 1 st Episode mid-November Similar in format to This Week in Tech Live streaming via http://tinychat.com/jquerypodcast Twitter Account: @jQueryPodcast
  • 42. The Official jQuery Podcast Interview key people in the jQuery Community First scheduled guest is John Resig Second scheduled guest is Richard D. Worth Hopefully Jeff and Joel in the future

Editor's Notes

  • #8: There are 11 thousand + questions tagged at stackoverflow, jQuery 9 th highest used tag. (higher than iphone) jQuery is second only to javascript in client side scripting languages in questions tagged
  • #9: It simplifies…
  • #15: Wrapped Set , is an array like structure that contains each of the selected DOM elements. You can iterate over the wrapped set like an array or access individual elements via the indexer. More importantly though you can also apply jQuery functions against all the selected elements.
  • #19: Any good JavaScript framework will do these top two points
  • #20: It’s these last four that really set jQuery apart
  • #21: It’s these last four that really set jQuery apart
  • #22: Learn jQuery Effects Demo
  • #23: Show AIR APP (Screen 4) The API is broken up to help you find what you need to do one of the core jquery functions select, create, do something then do something else. The API is categorized by functionality
  • #25: Create a private scope for the jQuery Alias
  • #38: So what do you need to do to be able to use jQuery on your page.
  • #44: Ask if there are any questions if there is time.