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

BOOM Performance
BOOM PerformanceBOOM Performance
BOOM Performancedapulse
 
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 anymoreRemy Sharp
 
Wookie Meetup
Wookie MeetupWookie Meetup
Wookie Meetupscottw
 
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 breaksColdFusionConference
 
Mojolicious, real-time web framework
Mojolicious, real-time web frameworkMojolicious, real-time web framework
Mojolicious, real-time web frameworktaggg
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hopeMarcus Ramberg
 
State of the resource timing api
State of the resource timing apiState of the resource timing api
State of the resource timing apiAaron Peters
 
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 ComponentsColdFusionConference
 
jQtouch, Building Awesome Webapps
jQtouch, Building Awesome WebappsjQtouch, Building Awesome Webapps
jQtouch, Building Awesome WebappsHome
 
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'tCosimo Streppone
 
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 2015Matt Raible
 
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 appsJohn Anderson
 
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 JaywayChristian Heilmann
 
Liferay + Wearables
Liferay + WearablesLiferay + Wearables
Liferay + WearablesZeno Rocha
 
Design+Performance Velocity 2015
Design+Performance Velocity 2015Design+Performance Velocity 2015
Design+Performance Velocity 2015Steve Souders
 
Game Development Using HTML 5
Game Development Using HTML 5Game Development Using HTML 5
Game Development Using HTML 5osa_ora
 
Rapid Testing, Rapid Development
Rapid Testing, Rapid DevelopmentRapid Testing, Rapid Development
Rapid Testing, Rapid Developmentmennovanslooten
 

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

Quick Guide For WordPress SEO
Quick Guide For WordPress SEOQuick Guide For WordPress SEO
Quick Guide For WordPress SEOBronson Quick
 
Supercharging WordPress with BuddyPress
Supercharging WordPress with BuddyPressSupercharging WordPress with BuddyPress
Supercharging WordPress with BuddyPressBronson Quick
 
WordPress Is Taking Over The Internet
WordPress Is Taking Over The InternetWordPress Is Taking Over The Internet
WordPress Is Taking Over The InternetBronson Quick
 
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 BuddyPressBronson Quick
 
Debugging WordPress Core and Plugins!
Debugging WordPress Core and Plugins!Debugging WordPress Core and Plugins!
Debugging WordPress Core and Plugins!Bronson Quick
 
The Outcome Economy
The Outcome EconomyThe Outcome Economy
The Outcome EconomyHelge Tennø
 

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

J Query Presentation
J Query PresentationJ Query Presentation
J Query PresentationVishal Kumar
 
Intro to jQuery - LUGOR - Part 1
Intro to jQuery - LUGOR - Part 1Intro to jQuery - LUGOR - Part 1
Intro to jQuery - LUGOR - Part 1Ralph Whitbeck
 
jQuery Presentation - Refresh Events
jQuery Presentation - Refresh EventsjQuery Presentation - Refresh Events
jQuery Presentation - Refresh EventsEugene Andruszczenko
 
Eugene Andruszczenko: jQuery
Eugene Andruszczenko: jQueryEugene Andruszczenko: jQuery
Eugene Andruszczenko: jQueryRefresh Events
 
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 '09Steve Souders
 
JavaScript performance patterns
JavaScript performance patternsJavaScript performance patterns
JavaScript performance patternsStoyan Stefanov
 
jQuery and_drupal
jQuery and_drupaljQuery and_drupal
jQuery and_drupalBlackCatWeb
 
Short intro to JQuery and Modernizr
Short intro to JQuery and ModernizrShort intro to JQuery and Modernizr
Short intro to JQuery and ModernizrJussi Pohjolainen
 
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 DevelopersTodd Anglin
 
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 analystsSimo Ahava
 
JavaScript Performance Patterns
JavaScript Performance PatternsJavaScript Performance Patterns
JavaScript Performance PatternsStoyan Stefanov
 
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 SitesSteve Souders
 
Web20expo 20080425
Web20expo 20080425Web20expo 20080425
Web20expo 20080425Media Gorod
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentationipolevoy
 
Getting Started with jQuery
Getting Started with jQueryGetting Started with jQuery
Getting Started with jQueryShea Frederick
 
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)Doris Chen
 

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

Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 

Recently uploaded (20)

Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).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