SlideShare a Scribd company logo
1 of 14
jQuery: Love at first sight...or site! Bronson Quick sennza  |  (07) 3040-1545  |  bronson@sennza.com.au  |  http://www.sennza.com.au/  |  Twitter: @sennza
What we’ll cover The basics A brief intro into the jQuery including:  Adding jQuery to a web page  Calling jQuery after the DOM has loaded  Basic selectors  Basic events & callback functions  Chaining Slide 2 of 14 rethink  |  redesign  |  results
Adding jQuery Give it to me jQuery! Uhuh, Uhuh! Use Google’s CDN <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> Given the number of pages using jQuery these days there is a good chance that jQuery will be already cached on the users browser. Speed up the page load time! See if it’s working: $('<p>Oh god yes!</p>').appendTo('body'); Before we use get to fool around with the awesomeness that is jQuery we have to tell the browser what we’re talking ‘about! Locally or from a CDN Where is your page going to be viewed? ,[object Object]
 Online
 Highly secured networkOnce you know the environment then you will know if you have to ship your app/page with jQuery or if you can use a Content Delivery Network (CDN). Slide 3 of 14 rethink  |  redesign  |  results
Using jQuery I was used! Use Google’s CDN <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> Given the number of pages using jQuery these days there is a good chance that jQuery will be already cached on the users browser. Speed up the page load time! Before we can add some jQuery sexiness we need to let the browser know that we are going to do something! The long way $(document).ready(function(){ 	alert(‘The world is a vampire!’); }); The ‘quick’ way $(function(){ 	alert(‘The world is a vampire!’); }); Slide 4 of 14 rethink  |  redesign  |  results
Selectors ID, classes & elements Get element by class name <ul> <li class="awesome">Google Search</li> <li class="awesome">Google Docs</li> <li>Google Chrome</li> </ul> $(function(){ 	$(“.awesome").css({ 		'backgroundColor':'#652D90', 		'color': '#fff' 	}); }); <div id=“yo”> <p>I like stuff. Do you like stuff?</p> </div> Get an element by ID $(function(){ 	$("#yo").css({ 		'backgroundColor':'#652D90', 		'color': '#fff' 	}); }); Slide 5 of 14 rethink  |  redesign  |  results
Selectors ID, classes & elements Pseudo class selectors <table> <tr><td>I'm even!</td></tr> <tr><td>I'm odd!</td></tr> <tr><td>I'm even!</td></tr> <tr><td>I'm odd!</td></tr> </table> $(function(){ 	$("td:even").css({ 		'backgroundColor':'#652D90', 		'color': '#fff' 	}); }); <h1>I am a heading!</h1> $(function(){ 	$(“h1").css({ 		'backgroundColor':'#652D90', 		'color': '#fff' 	}); }); Remember: This will get all HTML elements on the page so if you had multiple <h1>’s this change would apply to all of them. A great list of pseudo class selectors http://css-tricks.com/pseudo-class-selectors/ Slide 6 of 14 rethink  |  redesign  |  results
Events Lets interact with something Some handy events .click() .dblclick() .focus() .keypress() .mouseover() .hover() <h1>I am a heading!</h1> $(function(){ 	$("h1").click(function(){ 		$(this).css({ 		'backgroundColor':'#652D90', 		'color': '#fff' 		}); 	}); }); The full list of events http://api.jquery.com/category/events/ Slide 7 of 14 rethink  |  redesign  |  results
Effects Peek a boo! Fast, slow or milliseconds .hide(‘fast’); .hide(‘slow’); .hide(4000); $(function(){ 	$("#hide").click(function(){ 		$("h1").hide('fast'); 	}); 	$("#show").click(function(){ 		$("h1").show(‘slow’); 	}); }); <h1>I am a heading!</h1> <a href=“#” title=“Hide heading” id=“hide”>Hide heading</a> <a href=“#” title=“Show heading” id=“show”>Show heading</a> $(function(){ 	$(“#hide”).click(function(){ 		$(“h1”).hide(); 	}); 	$(“#show”).click(function(){ 		$(“h1”).show(); 	}); }); Slide 8 of 14 rethink  |  redesign  |  results
Effects Slide up, slide down, toggle Fast, slow or milliseconds $(function(){ 	$(“#up”).click(function(){ 		$(“#box”).slideUp(‘fast’); 	}); 	$(“#down”).click(function(){ 		$(“#box”).slideDown(‘slow’); 	}); }); <div id=“box”>I’m a box!</div> <a href=“#” title=“Slide up” id=“up”>Slide up</a> <a href=“#” title=“Slide down” id=“down”>Slide down</a> $(function(){ 	$(“#up”).click(function(){ 		$(“#box”).slideUp(); 	}); 	$(“#down”).click(function(){ 		$(“#box”).slideDown(); 	}); }); Slide 9 of 14 rethink  |  redesign  |  results
Effects I’m fading away to nothing! Fast, slow or milliseconds $(function(){ 	$(“#in”).click(function(){ 		$(“#box”).fadeIn(‘slow’); 	}); 	$(“#out”).click(function(){ 		$(“#box”).fadeOut(‘fast’); 	}); }); <div id=“box”>I’m a box!</div> <a href=“#” title=“Fade In” id=“in”>Fade In</a> <a href=“#” title=“Fade Out” id=“out”>Fade Out</a> $(function(){ 	$(“#in”).click(function(){ 		$(“#box”).fadeIn(); 	}); 	$(“#out”).click(function(){ 		$(“#box”).fadeOut(); 	}); }); The full list of effects http://api.jquery.com/category/effects/ Slide 10 of 14 rethink  |  redesign  |  results
Chaining Alice in Chains! <div id="box">I'm a box!</div> <a href="#" title="Chaining” id="chain">Chained</a> $(function(){ 	$("#chain").click(function(){ 		$("#box").fadeOut('slow').fadeIn(4000).slideUp(); 	}); }); Slide 11 of 14 rethink  |  redesign  |  results
Links Some useful jQuery links http://jquery.com/ http://api.jquery.com/ http://jqueryui.com/ Slide 12 of 14 rethink  |  redesign  |  results

More Related Content

What's hot

Wookie Meetup
Wookie MeetupWookie Meetup
Wookie Meetup
scottw
 
Mojolicious, real-time web framework
Mojolicious, real-time web frameworkMojolicious, real-time web framework
Mojolicious, real-time web framework
taggg
 
jQtouch, Building Awesome Webapps
jQtouch, Building Awesome WebappsjQtouch, Building Awesome Webapps
jQtouch, Building Awesome Webapps
Home
 
The Peanut Butter Cup of Web-dev: Plack and single page web apps
The Peanut Butter Cup of Web-dev: Plack and single page web appsThe Peanut Butter Cup of Web-dev: Plack and single page web apps
The Peanut Butter Cup of Web-dev: Plack and single page web apps
John Anderson
 

What's hot (19)

BOOM Performance
BOOM PerformanceBOOM Performance
BOOM Performance
 
HTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreHTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymore
 
Wookie Meetup
Wookie MeetupWookie Meetup
Wookie Meetup
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaks
 
Mojolicious, real-time web framework
Mojolicious, real-time web frameworkMojolicious, real-time web framework
Mojolicious, real-time web framework
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hope
 
State of the resource timing api
State of the resource timing apiState of the resource timing api
State of the resource timing api
 
The Future of CSS with Web Components
The Future of CSS with Web ComponentsThe Future of CSS with Web Components
The Future of CSS with Web Components
 
Mastering Grunt
Mastering GruntMastering Grunt
Mastering Grunt
 
jQtouch, Building Awesome Webapps
jQtouch, Building Awesome WebappsjQtouch, Building Awesome Webapps
jQtouch, Building Awesome Webapps
 
Mojolicious: what works and what doesn't
Mojolicious: what works and what doesn'tMojolicious: what works and what doesn't
Mojolicious: what works and what doesn't
 
The Art of AngularJS in 2015 - Angular Summit 2015
The Art of AngularJS in 2015 - Angular Summit 2015The Art of AngularJS in 2015 - Angular Summit 2015
The Art of AngularJS in 2015 - Angular Summit 2015
 
The Peanut Butter Cup of Web-dev: Plack and single page web apps
The Peanut Butter Cup of Web-dev: Plack and single page web appsThe Peanut Butter Cup of Web-dev: Plack and single page web apps
The Peanut Butter Cup of Web-dev: Plack and single page web apps
 
Yes, browsers can do that! Hybrid and future web meetup at Jayway
Yes, browsers can do that! Hybrid and future web meetup at JaywayYes, browsers can do that! Hybrid and future web meetup at Jayway
Yes, browsers can do that! Hybrid and future web meetup at Jayway
 
Liferay + Wearables
Liferay + WearablesLiferay + Wearables
Liferay + Wearables
 
Design+Performance Velocity 2015
Design+Performance Velocity 2015Design+Performance Velocity 2015
Design+Performance Velocity 2015
 
Game Development Using HTML 5
Game Development Using HTML 5Game Development Using HTML 5
Game Development Using HTML 5
 
Intro to jQuery
Intro to jQueryIntro to jQuery
Intro to jQuery
 
Rapid Testing, Rapid Development
Rapid Testing, Rapid DevelopmentRapid Testing, Rapid Development
Rapid Testing, Rapid Development
 

Viewers also liked

Supercharging WordPress with BuddyPress
Supercharging WordPress with BuddyPressSupercharging WordPress with BuddyPress
Supercharging WordPress with BuddyPress
Bronson Quick
 

Viewers also liked (8)

Music
MusicMusic
Music
 
Quick Guide For WordPress SEO
Quick Guide For WordPress SEOQuick Guide For WordPress SEO
Quick Guide For WordPress SEO
 
Supercharging WordPress with BuddyPress
Supercharging WordPress with BuddyPressSupercharging WordPress with BuddyPress
Supercharging WordPress with BuddyPress
 
WordPress Is Taking Over The Internet
WordPress Is Taking Over The InternetWordPress Is Taking Over The Internet
WordPress Is Taking Over The Internet
 
Creating an online social network using WordPress and BuddyPress
Creating an online social network using WordPress and BuddyPressCreating an online social network using WordPress and BuddyPress
Creating an online social network using WordPress and BuddyPress
 
Css3
Css3Css3
Css3
 
Debugging WordPress Core and Plugins!
Debugging WordPress Core and Plugins!Debugging WordPress Core and Plugins!
Debugging WordPress Core and Plugins!
 
The Outcome Economy
The Outcome EconomyThe Outcome Economy
The Outcome Economy
 

Similar to J Query - Your First Steps

Intro to jQuery - LUGOR - Part 1
Intro to jQuery - LUGOR - Part 1Intro to jQuery - LUGOR - Part 1
Intro to jQuery - LUGOR - Part 1
Ralph Whitbeck
 
Short intro to JQuery and Modernizr
Short intro to JQuery and ModernizrShort intro to JQuery and Modernizr
Short intro to JQuery and Modernizr
Jussi Pohjolainen
 
Web 2.0 Expo: Even Faster Web Sites
Web 2.0 Expo: Even Faster Web SitesWeb 2.0 Expo: Even Faster Web Sites
Web 2.0 Expo: Even Faster Web Sites
Steve Souders
 
Getting Started with jQuery
Getting Started with jQueryGetting Started with jQuery
Getting Started with jQuery
Shea Frederick
 

Similar to J Query - Your First Steps (20)

Intro to jQuery
Intro to jQueryIntro to jQuery
Intro to jQuery
 
jQuery Fundamentals
jQuery FundamentalsjQuery Fundamentals
jQuery Fundamentals
 
J Query Presentation
J Query PresentationJ Query Presentation
J Query Presentation
 
Intro to jQuery - LUGOR - Part 1
Intro to jQuery - LUGOR - Part 1Intro to jQuery - LUGOR - Part 1
Intro to jQuery - LUGOR - Part 1
 
jQuery Presentation - Refresh Events
jQuery Presentation - Refresh EventsjQuery Presentation - Refresh Events
jQuery Presentation - Refresh Events
 
Eugene Andruszczenko: jQuery
Eugene Andruszczenko: jQueryEugene Andruszczenko: jQuery
Eugene Andruszczenko: jQuery
 
Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09
 
JavaScript performance patterns
JavaScript performance patternsJavaScript performance patterns
JavaScript performance patterns
 
jQuery and_drupal
jQuery and_drupaljQuery and_drupal
jQuery and_drupal
 
jQuery Intro
jQuery IntrojQuery Intro
jQuery Intro
 
Short intro to JQuery and Modernizr
Short intro to JQuery and ModernizrShort intro to JQuery and Modernizr
Short intro to JQuery and Modernizr
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersAccelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
 
Taking your Web App for a walk
Taking your Web App for a walkTaking your Web App for a walk
Taking your Web App for a walk
 
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analystsMeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
 
JavaScript Performance Patterns
JavaScript Performance PatternsJavaScript Performance Patterns
JavaScript Performance Patterns
 
Web 2.0 Expo: Even Faster Web Sites
Web 2.0 Expo: Even Faster Web SitesWeb 2.0 Expo: Even Faster Web Sites
Web 2.0 Expo: Even Faster Web Sites
 
Web20expo 20080425
Web20expo 20080425Web20expo 20080425
Web20expo 20080425
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
Getting Started with jQuery
Getting Started with jQueryGetting Started with jQuery
Getting Started with jQuery
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 

J Query - Your First Steps

  • 1. jQuery: Love at first sight...or site! Bronson Quick sennza | (07) 3040-1545 | bronson@sennza.com.au | http://www.sennza.com.au/ | Twitter: @sennza
  • 2. What we’ll cover The basics A brief intro into the jQuery including: Adding jQuery to a web page Calling jQuery after the DOM has loaded Basic selectors Basic events & callback functions Chaining Slide 2 of 14 rethink | redesign | results
  • 3.
  • 5. Highly secured networkOnce you know the environment then you will know if you have to ship your app/page with jQuery or if you can use a Content Delivery Network (CDN). Slide 3 of 14 rethink | redesign | results
  • 6. Using jQuery I was used! Use Google’s CDN <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> Given the number of pages using jQuery these days there is a good chance that jQuery will be already cached on the users browser. Speed up the page load time! Before we can add some jQuery sexiness we need to let the browser know that we are going to do something! The long way $(document).ready(function(){ alert(‘The world is a vampire!’); }); The ‘quick’ way $(function(){ alert(‘The world is a vampire!’); }); Slide 4 of 14 rethink | redesign | results
  • 7. Selectors ID, classes & elements Get element by class name <ul> <li class="awesome">Google Search</li> <li class="awesome">Google Docs</li> <li>Google Chrome</li> </ul> $(function(){ $(“.awesome").css({ 'backgroundColor':'#652D90', 'color': '#fff' }); }); <div id=“yo”> <p>I like stuff. Do you like stuff?</p> </div> Get an element by ID $(function(){ $("#yo").css({ 'backgroundColor':'#652D90', 'color': '#fff' }); }); Slide 5 of 14 rethink | redesign | results
  • 8. Selectors ID, classes & elements Pseudo class selectors <table> <tr><td>I'm even!</td></tr> <tr><td>I'm odd!</td></tr> <tr><td>I'm even!</td></tr> <tr><td>I'm odd!</td></tr> </table> $(function(){ $("td:even").css({ 'backgroundColor':'#652D90', 'color': '#fff' }); }); <h1>I am a heading!</h1> $(function(){ $(“h1").css({ 'backgroundColor':'#652D90', 'color': '#fff' }); }); Remember: This will get all HTML elements on the page so if you had multiple <h1>’s this change would apply to all of them. A great list of pseudo class selectors http://css-tricks.com/pseudo-class-selectors/ Slide 6 of 14 rethink | redesign | results
  • 9. Events Lets interact with something Some handy events .click() .dblclick() .focus() .keypress() .mouseover() .hover() <h1>I am a heading!</h1> $(function(){ $("h1").click(function(){ $(this).css({ 'backgroundColor':'#652D90', 'color': '#fff' }); }); }); The full list of events http://api.jquery.com/category/events/ Slide 7 of 14 rethink | redesign | results
  • 10. Effects Peek a boo! Fast, slow or milliseconds .hide(‘fast’); .hide(‘slow’); .hide(4000); $(function(){ $("#hide").click(function(){ $("h1").hide('fast'); }); $("#show").click(function(){ $("h1").show(‘slow’); }); }); <h1>I am a heading!</h1> <a href=“#” title=“Hide heading” id=“hide”>Hide heading</a> <a href=“#” title=“Show heading” id=“show”>Show heading</a> $(function(){ $(“#hide”).click(function(){ $(“h1”).hide(); }); $(“#show”).click(function(){ $(“h1”).show(); }); }); Slide 8 of 14 rethink | redesign | results
  • 11. Effects Slide up, slide down, toggle Fast, slow or milliseconds $(function(){ $(“#up”).click(function(){ $(“#box”).slideUp(‘fast’); }); $(“#down”).click(function(){ $(“#box”).slideDown(‘slow’); }); }); <div id=“box”>I’m a box!</div> <a href=“#” title=“Slide up” id=“up”>Slide up</a> <a href=“#” title=“Slide down” id=“down”>Slide down</a> $(function(){ $(“#up”).click(function(){ $(“#box”).slideUp(); }); $(“#down”).click(function(){ $(“#box”).slideDown(); }); }); Slide 9 of 14 rethink | redesign | results
  • 12. Effects I’m fading away to nothing! Fast, slow or milliseconds $(function(){ $(“#in”).click(function(){ $(“#box”).fadeIn(‘slow’); }); $(“#out”).click(function(){ $(“#box”).fadeOut(‘fast’); }); }); <div id=“box”>I’m a box!</div> <a href=“#” title=“Fade In” id=“in”>Fade In</a> <a href=“#” title=“Fade Out” id=“out”>Fade Out</a> $(function(){ $(“#in”).click(function(){ $(“#box”).fadeIn(); }); $(“#out”).click(function(){ $(“#box”).fadeOut(); }); }); The full list of effects http://api.jquery.com/category/effects/ Slide 10 of 14 rethink | redesign | results
  • 13. Chaining Alice in Chains! <div id="box">I'm a box!</div> <a href="#" title="Chaining” id="chain">Chained</a> $(function(){ $("#chain").click(function(){ $("#box").fadeOut('slow').fadeIn(4000).slideUp(); }); }); Slide 11 of 14 rethink | redesign | results
  • 14. Links Some useful jQuery links http://jquery.com/ http://api.jquery.com/ http://jqueryui.com/ Slide 12 of 14 rethink | redesign | results
  • 15. Thanks & Questions Blatant plug for our WordPress Meetup group WordPress Brisbane http://www.meetup.com/WordPress-Brisbane Slide 13 of 14 rethink | redesign | results