SlideShare a Scribd company logo
Designers Guide to Presented by Steve Krueger
What is jQuery? A fast, concise, JavaScript Framework Think of it as JavaScript, but in shorthand Simplifies cross-browser issues and compatibilities Small file-size = faster load times
What is jQuery? Makes writing JavaScript fun! blasphemy!!!11
So what can jQuery do for me? create animations on your website add user interaction to your website modify HTML markup without touching your HTML files AJAX functionality with jQuery
Example uses of jQuery Farbtastic colour picker  (Colour Module in Drupal Core) Spin.com   (Quick Tabs Module) Common Sense Media  (various animations)
Where and How do I start? Leverage pre-existing CSS knowledge towards learning jQuery the jQuery Library at  http://www.jquery.com/ jQuery is in Drupal core an empty JS file  (for our jQuery functions and animations)
Where and How do I start? Every file begins with the following: $(document). ready (function() { });
What is the DOM? the hierarchy of your HTML tree structure <html> <head>  // Is an ancestor of <html> <title> Untitled </title>  // is an ancestor of <head> </head> <body>  // is a sibling of <head> and ancestor of <html> <div id=“ foobar ”> ……
What is the DOM? the hierarchy of your HTML tree structure <html> <head> <body> <title> Untitled <div> … ..
jQuery Example (selects all  <p>  elements and adds a class of ‘italic’ to them.) $(document). ready (function() { $( ‘p’ ). addClass ( ‘italic’ ); });
jQuery Example (hovering over any  <p>  will assign the CSS property background-color with the value of “yellow” to them.) $(document). ready (function() { $( &quot;p&quot; ). hover (function () { $(this). css ({  backgroundColor:&quot;yellow” }); } });
jQuery Example $(this). parent (). find ( “div.foo” ) … <div id= “parent” >  // is parent() <a href= “#” >Foo</a>  // is (this) </div> <div class= “foo” >  // is find(“div.foo”) …
Selectors - CSS $( ‘a’ )  // Gets all anchor tags in the document $( ‘div.foobar’ )  // Gets all div’s with the class of foobar $( ‘#container’ )  // Gets the element with the ID of container
Selectors - XPath $( ‘a [@href^=“ mailto: ”] ’ )  // Gets all anchor elements with an href that begins with mailto: $( ‘img [@title] ’ )  // Gets all images with title attributes $( ‘div [ul] ’ )  // Gets div’s that contain ul elements for more info on XPath selectors: http://www.w3schools.com/XPath/xpath_syntax.asp
jQuery Manipulation $(this). text ( “lorem ipsum” )  // inputs text into the selected element $(this). empty ()  // empties the current selected element $(this). append ( “<span>Foobar!</span>” )  // appends stuff !!
jQuery Events $( “p” ). hover (function() {…  // when you hover over all p tags.. $( “a” ). click (function() {…  // when you click on any anchor tag..
Tutorial Time! stevekrueger.com/jquery-accordion-tutorial

More Related Content

PPT
How to learn j query
PPT
A Short Introduction To jQuery
PPTX
PPT
jQuery Learning
PDF
jQuery - 10 Time-Savers You (Maybe) Don't Know
PPTX
jQuery
PDF
jQuery Essentials
PDF
JavaScript the Smart Way - Getting Started with jQuery
How to learn j query
A Short Introduction To jQuery
jQuery Learning
jQuery - 10 Time-Savers You (Maybe) Don't Know
jQuery
jQuery Essentials
JavaScript the Smart Way - Getting Started with jQuery

What's hot (20)

PDF
D3.js and SVG
PDF
Andreas Roth - GraphQL erfolgreich im Backend einsetzen
PDF
Write Less Do More
PDF
bcgr3-jquery
PDF
jQuery Essentials
PDF
jQuery Introduction
PPT
PDF
Learning jQuery in 30 minutes
DOCX
PDF
An Overview of HTML5 Storage
PDF
State of jQuery and Drupal
PDF
[PyConTW 2013] Write Sublime Text 2 Packages with Python
ODP
Mojolicious on Steroids
ODP
Coding In Php
ZIP
Drupal Development
PDF
Introduction to jQuery (Ajax Exp 2006)
PPT
Yuihacku iitd-sumana
PDF
jQuery: Nuts, Bolts and Bling
PDF
Organizing Code with JavascriptMVC
PPTX
CT presentatie JQuery 7.12.11
D3.js and SVG
Andreas Roth - GraphQL erfolgreich im Backend einsetzen
Write Less Do More
bcgr3-jquery
jQuery Essentials
jQuery Introduction
Learning jQuery in 30 minutes
An Overview of HTML5 Storage
State of jQuery and Drupal
[PyConTW 2013] Write Sublime Text 2 Packages with Python
Mojolicious on Steroids
Coding In Php
Drupal Development
Introduction to jQuery (Ajax Exp 2006)
Yuihacku iitd-sumana
jQuery: Nuts, Bolts and Bling
Organizing Code with JavascriptMVC
CT presentatie JQuery 7.12.11
Ad

Similar to Designers Guide To jQuery (20)

KEY
Introduction to jQuery - Barcamp London 9
ODP
Jquery- One slide completing all JQuery
PPTX
jQuery Presentasion
PPTX
Web technologies-course 11.pptx
ODP
Introduction to jQuery
PPT
jQuery Introduction/ jquery basic concept
PDF
jQuery Loves Developers - Oredev 2009
PPT
JQuery introduction
PPTX
Web Development Introduction to jQuery
PPT
Jquery presentation
PPT
J query presentation
PPT
J query presentation
PPTX
Getting Started with jQuery
PPTX
jQuery, CSS3 and ColdFusion
PDF
Learning jquery-in-30-minutes-1195942580702664-3
PPTX
Jquery Complete Presentation along with Javascript Basics
PPTX
jQuery
PPTX
PPTX
Jqueryppt (1)
Introduction to jQuery - Barcamp London 9
Jquery- One slide completing all JQuery
jQuery Presentasion
Web technologies-course 11.pptx
Introduction to jQuery
jQuery Introduction/ jquery basic concept
jQuery Loves Developers - Oredev 2009
JQuery introduction
Web Development Introduction to jQuery
Jquery presentation
J query presentation
J query presentation
Getting Started with jQuery
jQuery, CSS3 and ColdFusion
Learning jquery-in-30-minutes-1195942580702664-3
Jquery Complete Presentation along with Javascript Basics
jQuery
Jqueryppt (1)
Ad

Recently uploaded (20)

PDF
Advanced IT Governance
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
PDF
Empathic Computing: Creating Shared Understanding
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Advanced Soft Computing BINUS July 2025.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Modernizing your data center with Dell and AMD
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Chapter 2 Digital Image Fundamentals.pdf
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Advanced IT Governance
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
Empathic Computing: Creating Shared Understanding
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Understanding_Digital_Forensics_Presentation.pptx
Review of recent advances in non-invasive hemoglobin estimation
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
madgavkar20181017ppt McKinsey Presentation.pdf
Electronic commerce courselecture one. Pdf
Advanced Soft Computing BINUS July 2025.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Modernizing your data center with Dell and AMD
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Chapter 2 Digital Image Fundamentals.pdf
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....

Designers Guide To jQuery

  • 1. Designers Guide to Presented by Steve Krueger
  • 2. What is jQuery? A fast, concise, JavaScript Framework Think of it as JavaScript, but in shorthand Simplifies cross-browser issues and compatibilities Small file-size = faster load times
  • 3. What is jQuery? Makes writing JavaScript fun! blasphemy!!!11
  • 4. So what can jQuery do for me? create animations on your website add user interaction to your website modify HTML markup without touching your HTML files AJAX functionality with jQuery
  • 5. Example uses of jQuery Farbtastic colour picker (Colour Module in Drupal Core) Spin.com (Quick Tabs Module) Common Sense Media (various animations)
  • 6. Where and How do I start? Leverage pre-existing CSS knowledge towards learning jQuery the jQuery Library at http://www.jquery.com/ jQuery is in Drupal core an empty JS file (for our jQuery functions and animations)
  • 7. Where and How do I start? Every file begins with the following: $(document). ready (function() { });
  • 8. What is the DOM? the hierarchy of your HTML tree structure <html> <head> // Is an ancestor of <html> <title> Untitled </title> // is an ancestor of <head> </head> <body> // is a sibling of <head> and ancestor of <html> <div id=“ foobar ”> ……
  • 9. What is the DOM? the hierarchy of your HTML tree structure <html> <head> <body> <title> Untitled <div> … ..
  • 10. jQuery Example (selects all <p> elements and adds a class of ‘italic’ to them.) $(document). ready (function() { $( ‘p’ ). addClass ( ‘italic’ ); });
  • 11. jQuery Example (hovering over any <p> will assign the CSS property background-color with the value of “yellow” to them.) $(document). ready (function() { $( &quot;p&quot; ). hover (function () { $(this). css ({ backgroundColor:&quot;yellow” }); } });
  • 12. jQuery Example $(this). parent (). find ( “div.foo” ) … <div id= “parent” > // is parent() <a href= “#” >Foo</a> // is (this) </div> <div class= “foo” > // is find(“div.foo”) …
  • 13. Selectors - CSS $( ‘a’ ) // Gets all anchor tags in the document $( ‘div.foobar’ ) // Gets all div’s with the class of foobar $( ‘#container’ ) // Gets the element with the ID of container
  • 14. Selectors - XPath $( ‘a [@href^=“ mailto: ”] ’ ) // Gets all anchor elements with an href that begins with mailto: $( ‘img [@title] ’ ) // Gets all images with title attributes $( ‘div [ul] ’ ) // Gets div’s that contain ul elements for more info on XPath selectors: http://www.w3schools.com/XPath/xpath_syntax.asp
  • 15. jQuery Manipulation $(this). text ( “lorem ipsum” ) // inputs text into the selected element $(this). empty () // empties the current selected element $(this). append ( “<span>Foobar!</span>” ) // appends stuff !!
  • 16. jQuery Events $( “p” ). hover (function() {… // when you hover over all p tags.. $( “a” ). click (function() {… // when you click on any anchor tag..

Editor's Notes

  • #2: I’m no an expert Focus is on designers Questions should be forwarded on to the next session about jquery for module developers We’ll be going through some basic jquery theory, do 2 practical tutorials, then save for an open discussion at the end, maybe show off what other people have done with jquery Who has worked with jquery before? Who has worked with javascript? CSS? HTML?