jQuery Jason Noble http:// jasonnoble.org Code Download: http://jasonnoble.org/jquery/jquery.zip
History John Resig hints of a JavaScript library to use CSS selectors with a more succint syntax than existing libraries (2005) First release January 2006
Benefits Easy to play with the DOM Add JS effects AJAX Cross-browser Compatibility jQuery handles browser caveats for you CSS3 Selectors Helpful Utilities
Benefits (cont.) jQuery UI Useful effects Advanced UI widgets UI Themes Plugins jQuery is easily extensible Widespread adoption
Firefox/Firebug Combo Firefox Firebug plugin
Let ’s get Started curl -o jquery-1.4.4.min.js  http://code.jquery.com/jquery-1.4.4.min.js vi hello.html
jQuery Function Adding jQuery to a HTML page gives you access to the jQuery function jQuery jQuery(alert( ‘Hello’)) jQuery function is aliased as $ $ $(alert( ‘Hello’))
Document Object Model (DOM) Not specific to jQuery Standard way of representing objects in HTML that all browsers follow Hierarchal representation of your HTML Parent and children elements Each element can have an id and/or one or more class attributes
DOM (Cont.)
Elements id Uniquely identifies the element <div id= “footer”>Thanks for visiting</div> That div’s id is  “footer”.  Should only be one “footer” id.
Elements class Multiple page elements can have the same type of class <p class= “warning”>Sorry….</p> <span class= “warning error”>Please try again</span> Classifies elements as a  “warning” Multiple classes on an element are seperated by spaces
CSS Selectors # selects an element via id div#heading <div id= “heading”> . selects an element via class div.heading <div class= “heading”> Bare words selects HTML tags span <span>
Update our HTML
jQuery Statements selector  action  parameters jQuery( ‘p’)  .css  (‘color’, ‘blue’); $( ‘p’)  .css  (‘color’, ‘blue’); $( ‘p’)  .css  (‘font-size’, ‘35px’);
jQuery Statements $('#one').css('color', 'green'); $('.not_first').css('font-size', '22pt'); $('p.first').html('This is better');
Document Ready Event When our document is ready,  run our function <script> $(document).ready(function() { alert( ‘Welcome to my page!’); }); </script> This is a fairly common code snippet
Play with tables
jQuery filters Removes certain elements $( ‘table tr: even ’)  # => 0, 2, 4, 6… $( ‘table tr: odd ’)  # => 1, 3, 5, 7… $( ‘table tr: first ’)  # => 0 $( ‘table tr: last ’)  # => Last row $( ‘table tr: eq(3) ’)  # => Third row
Play with tables (cont.) $('table tr:even').css('background-color', 'lightgrey') $('table tr:first').css('font-size', '64pt') $('table tr td').filter(function(index) { return index % 3 == 2; }).css('color', 'red') Many more selectors: http://api.jquery.com/category/selectors/
Playing with Ajax Asynchronous JavaScript and XML Allows you to update elements on your page without refreshing the entire page Google suggest was one of the first sites to use it (2005)
load.html
Ajax Content
ajaxStart / ajaxStop $(document).ajaxStart(…) Called when an ajax request is started $(document).ajaxStop(…) Called when an ajax request is complete
$(selector).click(…) Executes code when a given div/button/etc is clicked
Username Validation Uses a jQuery plugin (jquery.validate) http://bassistance.de/jquery-plugins/jquery-plugin-validation/

More Related Content

PPTX
Intro to Rails Give Camp Atlanta
PPTX
Catalog display
PPTX
Dash of ajax
KEY
I18n
PDF
Python for AngularJS
PDF
Story Driven Development With Cucumber
PPTX
I Love codeigniter, You?
PDF
Angular Classy
Intro to Rails Give Camp Atlanta
Catalog display
Dash of ajax
I18n
Python for AngularJS
Story Driven Development With Cucumber
I Love codeigniter, You?
Angular Classy

What's hot (20)

PDF
RSpec User Stories
PPTX
Apex & jQuery Mobile
PPTX
5 Reasons To Love CodeIgniter
ZIP
Presentation.Key
PDF
Telling Stories With RSpec
PDF
Active Admin
PDF
Be happy with Ruby on Rails - CEUNSP Itu
PDF
Behavior Driven Development - How To Start with Behat
PPTX
SPA using Rails & Backbone
PDF
jQuery Mobile Workshop
PPTX
Plugins unplugged
PDF
Ajax on drupal the right way - DrupalCamp Campinas, São Paulo, Brazil 2016
DOCX
Controller in AngularJS
PPTX
Automated layout testing using Galen Framework
PDF
A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...
PDF
Multi screen HTML5
PPTX
Testing C# and ASP.net using Ruby
PDF
BDD with cucumber
PDF
Introduction to Ruby On Rails
KEY
How To Write a WordPress Plugin
RSpec User Stories
Apex & jQuery Mobile
5 Reasons To Love CodeIgniter
Presentation.Key
Telling Stories With RSpec
Active Admin
Be happy with Ruby on Rails - CEUNSP Itu
Behavior Driven Development - How To Start with Behat
SPA using Rails & Backbone
jQuery Mobile Workshop
Plugins unplugged
Ajax on drupal the right way - DrupalCamp Campinas, São Paulo, Brazil 2016
Controller in AngularJS
Automated layout testing using Galen Framework
A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...
Multi screen HTML5
Testing C# and ASP.net using Ruby
BDD with cucumber
Introduction to Ruby On Rails
How To Write a WordPress Plugin

Viewers also liked (13)

PDF
History of jQuery
PPTX
jQuery Presentation
PPTX
Intro to Rails 4
PDF
jQuery in 15 minutes
PPTX
jQuery PPT
PDF
jQuery for beginners
PDF
Learning jQuery in 30 minutes
PDF
Fundamental JavaScript [UTC, March 2014]
PPT
Introduction to Javascript
PPT
Js ppt
PPT
JavaScript - An Introduction
PDF
jQuery Essentials
PDF
JavaScript Programming
History of jQuery
jQuery Presentation
Intro to Rails 4
jQuery in 15 minutes
jQuery PPT
jQuery for beginners
Learning jQuery in 30 minutes
Fundamental JavaScript [UTC, March 2014]
Introduction to Javascript
Js ppt
JavaScript - An Introduction
jQuery Essentials
JavaScript Programming

Similar to jQuery Intro (20)

PPT
Intro to jQuery
PPTX
jQuery
PPTX
Introduction to JQuery
PPT
Jquery presentation
PPTX
Jquery
PPTX
jQuery Presentasion
PDF
Introduction to jQuery
PPTX
Web technologies-course 11.pptx
PPTX
JQuery
KEY
jQuery Selectors
PDF
Advanced JQuery Mobile tutorial with Phonegap
PPTX
FFW Gabrovo PMG - jQuery
PPT
ODP
Jquery- One slide completing all JQuery
PPTX
Introduction to jquery mobile with Phonegap
PPTX
Getting Started with jQuery
PDF
jQuery Internals + Cool Stuff
PPTX
PPT
JavaScript Libraries
Intro to jQuery
jQuery
Introduction to JQuery
Jquery presentation
Jquery
jQuery Presentasion
Introduction to jQuery
Web technologies-course 11.pptx
JQuery
jQuery Selectors
Advanced JQuery Mobile tutorial with Phonegap
FFW Gabrovo PMG - jQuery
Jquery- One slide completing all JQuery
Introduction to jquery mobile with Phonegap
Getting Started with jQuery
jQuery Internals + Cool Stuff
JavaScript Libraries

More from Jason Noble (14)

PPTX
Intro to TDD and BDD
PPTX
Davinci git brown_bag
PPTX
Rspec 101
PPTX
Google apps
PPTX
Smarter cart
PPTX
Cart creation-101217222728-phpapp01
PPTX
Validation unit testing
PPT
Creating the application
PPT
Capistrano
PPT
Atlanta Pm Git 101
PPT
Regex Intro
PPT
Git101
PPT
Git Atlrug
PPT
Git102
Intro to TDD and BDD
Davinci git brown_bag
Rspec 101
Google apps
Smarter cart
Cart creation-101217222728-phpapp01
Validation unit testing
Creating the application
Capistrano
Atlanta Pm Git 101
Regex Intro
Git101
Git Atlrug
Git102

Recently uploaded (20)

PDF
The Digital Engine Room: Unlocking APAC’s Economic and Digital Potential thro...
PPTX
AQUEEL MUSHTAQUE FAKIH COMPUTER CENTER .
PPTX
Strategic Picks — Prioritising the Right Agentic Use Cases [2/6]
PDF
Internet of Things (IoT) – Definition, Types, and Uses
PPTX
From Curiosity to ROI — Cost-Benefit Analysis of Agentic Automation [3/6]
PDF
Child-friendly e-learning for artificial intelligence education in Indonesia:...
PDF
Ebook - The Future of AI A Comprehensive Guide.pdf
PPTX
Blending method and technology for hydrogen.pptx
PDF
Streamline Vulnerability Management From Minimal Images to SBOMs
PDF
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
PPTX
Report in SIP_Distance_Learning_Technology_Impact.pptx
PPTX
maintenance powerrpoint for adaprive and preventive
PPTX
Slides World Game (s) Great Redesign Eco Economic Epochs.pptx
PDF
Uncertainty-aware contextual multi-armed bandits for recommendations in e-com...
PDF
“Introduction to Designing with AI Agents,” a Presentation from Amazon Web Se...
PPTX
Information-Technology-in-Human-Society.pptx
PDF
Secure Java Applications against Quantum Threats
PDF
EIS-Webinar-Regulated-Industries-2025-08.pdf
PDF
NewMind AI Journal Monthly Chronicles - August 2025
PDF
The AI Revolution in Customer Service - 2025
The Digital Engine Room: Unlocking APAC’s Economic and Digital Potential thro...
AQUEEL MUSHTAQUE FAKIH COMPUTER CENTER .
Strategic Picks — Prioritising the Right Agentic Use Cases [2/6]
Internet of Things (IoT) – Definition, Types, and Uses
From Curiosity to ROI — Cost-Benefit Analysis of Agentic Automation [3/6]
Child-friendly e-learning for artificial intelligence education in Indonesia:...
Ebook - The Future of AI A Comprehensive Guide.pdf
Blending method and technology for hydrogen.pptx
Streamline Vulnerability Management From Minimal Images to SBOMs
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
Report in SIP_Distance_Learning_Technology_Impact.pptx
maintenance powerrpoint for adaprive and preventive
Slides World Game (s) Great Redesign Eco Economic Epochs.pptx
Uncertainty-aware contextual multi-armed bandits for recommendations in e-com...
“Introduction to Designing with AI Agents,” a Presentation from Amazon Web Se...
Information-Technology-in-Human-Society.pptx
Secure Java Applications against Quantum Threats
EIS-Webinar-Regulated-Industries-2025-08.pdf
NewMind AI Journal Monthly Chronicles - August 2025
The AI Revolution in Customer Service - 2025

jQuery Intro

  • 1. jQuery Jason Noble http:// jasonnoble.org Code Download: http://jasonnoble.org/jquery/jquery.zip
  • 2. History John Resig hints of a JavaScript library to use CSS selectors with a more succint syntax than existing libraries (2005) First release January 2006
  • 3. Benefits Easy to play with the DOM Add JS effects AJAX Cross-browser Compatibility jQuery handles browser caveats for you CSS3 Selectors Helpful Utilities
  • 4. Benefits (cont.) jQuery UI Useful effects Advanced UI widgets UI Themes Plugins jQuery is easily extensible Widespread adoption
  • 6. Let ’s get Started curl -o jquery-1.4.4.min.js http://code.jquery.com/jquery-1.4.4.min.js vi hello.html
  • 7. jQuery Function Adding jQuery to a HTML page gives you access to the jQuery function jQuery jQuery(alert( ‘Hello’)) jQuery function is aliased as $ $ $(alert( ‘Hello’))
  • 8. Document Object Model (DOM) Not specific to jQuery Standard way of representing objects in HTML that all browsers follow Hierarchal representation of your HTML Parent and children elements Each element can have an id and/or one or more class attributes
  • 10. Elements id Uniquely identifies the element <div id= “footer”>Thanks for visiting</div> That div’s id is “footer”. Should only be one “footer” id.
  • 11. Elements class Multiple page elements can have the same type of class <p class= “warning”>Sorry….</p> <span class= “warning error”>Please try again</span> Classifies elements as a “warning” Multiple classes on an element are seperated by spaces
  • 12. CSS Selectors # selects an element via id div#heading <div id= “heading”> . selects an element via class div.heading <div class= “heading”> Bare words selects HTML tags span <span>
  • 14. jQuery Statements selector action parameters jQuery( ‘p’) .css (‘color’, ‘blue’); $( ‘p’) .css (‘color’, ‘blue’); $( ‘p’) .css (‘font-size’, ‘35px’);
  • 15. jQuery Statements $('#one').css('color', 'green'); $('.not_first').css('font-size', '22pt'); $('p.first').html('This is better');
  • 16. Document Ready Event When our document is ready, run our function <script> $(document).ready(function() { alert( ‘Welcome to my page!’); }); </script> This is a fairly common code snippet
  • 18. jQuery filters Removes certain elements $( ‘table tr: even ’) # => 0, 2, 4, 6… $( ‘table tr: odd ’) # => 1, 3, 5, 7… $( ‘table tr: first ’) # => 0 $( ‘table tr: last ’) # => Last row $( ‘table tr: eq(3) ’) # => Third row
  • 19. Play with tables (cont.) $('table tr:even').css('background-color', 'lightgrey') $('table tr:first').css('font-size', '64pt') $('table tr td').filter(function(index) { return index % 3 == 2; }).css('color', 'red') Many more selectors: http://api.jquery.com/category/selectors/
  • 20. Playing with Ajax Asynchronous JavaScript and XML Allows you to update elements on your page without refreshing the entire page Google suggest was one of the first sites to use it (2005)
  • 23. ajaxStart / ajaxStop $(document).ajaxStart(…) Called when an ajax request is started $(document).ajaxStop(…) Called when an ajax request is complete
  • 24. $(selector).click(…) Executes code when a given div/button/etc is clicked
  • 25. Username Validation Uses a jQuery plugin (jquery.validate) http://bassistance.de/jquery-plugins/jquery-plugin-validation/

Editor's Notes

  • #10: Body has two child elements, an h1 and a p. Body is the h1 ’s parent, h1 is a child of body