SlideShare a Scribd company logo
jQuery BrownbagRod Johnson
Checking for Null ValuesC# Way…JavaScript Way
Setting Default ValuesC# Way…JavaScript Way
PropertiesC# Way…JavaScript Way
Why is jQuery Awesome?What jQuery does well:Simplified AJAXDOM ManipulationEvent ManagementAnimationsNormalizes Browser DifferencesWhy It Is Successful:Well DesignedEasy to extend with pluginsGreat DocumentationLarge jQuery CommunityCross-browser
jQuery Founder
jQuery PhilosophyFind some stuffDo something to it
Chaining
Example: Conditional Hide Show
Selecting Elements: Basic CSS Selectors
Selecting Elements: Positional Selectors
Example: Expanding Form
Example: Expanding Form - ContinuedIterate through jQuery wrapped set by using the each() method.There are 2 ways to pass in this data.Controls the context.  This is consistent.Since this item is added dynamically, you will need to use the live() method instead of bind()You can chain jQuery objects to each other.  This makes for really succinct statements.Indent your code so you can easily see what is the current object in the chainControl chaining with the end() method
Events in jQueryControl how this event gets bubbled down the DOMPrevent the default behavior of an element.  Useful for buttons and links.Bind an element that is already added to the DOMBind an element that is not yet added to the DOM.  Very useful with Ajax or adding elements dynamicallyNamespacing works really well when you have multiple listeners attached to the same element.Unbinding events.Opposite of live()
Example: Pager
Example: Pager - ContinuedSetup event handlerOptional second parameter stores your custom data that is passed from the eventEvents can be triggered by using the trigger() method.Load custom data from the data attribute of the html elementAlways prevent the default behavior of any hyperlink event you trap.
Example: Default ImagesBind default resources on the “error” event.
jQuery in Visual StudioBy adding script references to your .js file, you get intellisense… kinda.You will not be able to select any elements until the document is ready.Most if your work will happen here.Good practice to always alias your $ by using Local Scope.  This will prevent any collisions with any other library that may use $ variable
Example: Simulated Page LifecycleBy adding script references to your .js file, you get intellisense… kinda.Works good if you have multiple js files that all depend on the document loaded event
Example: Ajax ProxyVery flexible way to pass in parameters to a function.Pass in as many or as few parameters as you need.Alias your functions by using jQuery as $
Example: Ajax Dropdown with ASP.NET MVC
Pattern: Default ValuesOld way… Doesn’t scale very well at all.Pass in an object hash with as many or as few parameters as you want.jQuery Way…Enumerate any default valuesDefault values will be overwritten by the values you passed in the ‘params’ object.
jQuery Plugins
jQuery UI Plugin
jQuery - BBQhttp://benalman.com/projects/jquery-bbq-plugin/Merge query string fragments into the query string#foo=1&bar=2Maintains history with each hash changeGreat for AJAX history managementPagingTabs
Linq to jQueryWithout Linq to jQuery…With Linq to jQuery…
Plugin AuthoringDon’t break the chain…Can use as if it were just a regular jQuery method
Learn More About jQuery
jQuery Documentation
Learn Morehttp://jquerylist.com/http://enterprisejquery.comhttp://jquery.com

More Related Content

PDF
jQuery Loves Developers - Oredev 2009
PPTX
PDF
jQuery for beginners
PPT
JQuery introduction
PPT
PDF
jQuery Essentials
ODP
Introduction to jQuery
PPTX
jQuery
jQuery Loves Developers - Oredev 2009
jQuery for beginners
JQuery introduction
jQuery Essentials
Introduction to jQuery
jQuery

What's hot (20)

PDF
jQuery Essentials
PPTX
jQuery from the very beginning
PPTX
jQuery PPT
PPTX
Introduction to jQuery
PPT
A Short Introduction To jQuery
PPTX
JavaScript and jQuery Basics
PDF
jQuery in 15 minutes
PDF
Introduction to jQuery
PPTX
jQuery Fundamentals
PDF
D3.js and SVG
PDF
Write Less Do More
PDF
Learning jQuery in 30 minutes
PPTX
jQuery
PPT
PDF
jQuery Introduction
PPTX
Unobtrusive javascript with jQuery
PDF
jQuery Features to Avoid
PPTX
Jquery Complete Presentation along with Javascript Basics
PPTX
Getting the Most Out of jQuery Widgets
jQuery Essentials
jQuery from the very beginning
jQuery PPT
Introduction to jQuery
A Short Introduction To jQuery
JavaScript and jQuery Basics
jQuery in 15 minutes
Introduction to jQuery
jQuery Fundamentals
D3.js and SVG
Write Less Do More
Learning jQuery in 30 minutes
jQuery
jQuery Introduction
Unobtrusive javascript with jQuery
jQuery Features to Avoid
Jquery Complete Presentation along with Javascript Basics
Getting the Most Out of jQuery Widgets
Ad

Viewers also liked (18)

PDF
jQuery for beginners
PDF
reveal.js 3.0.0
PPT
Js ppt
PPT
Introduction to Javascript
PPT
Javascript
PPT
JavaScript - An Introduction
PDF
JavaScript Programming
PDF
Introduction to Bootstrap
PPTX
Bootstrap ppt
PDF
Fundamental JavaScript [UTC, March 2014]
PDF
Introduction to JavaScript
KEY
Hello Cats: MobileWidgetCamp talk about mobile widgets
PDF
JavaScript and jQuery - Web Technologies (1019888BNR)
PDF
JQuery In Drupal
ODP
Jquery- One slide completing all JQuery
KEY
JQuery: JavaScript Library of the Future
PPTX
webstudy jquery
jQuery for beginners
reveal.js 3.0.0
Js ppt
Introduction to Javascript
Javascript
JavaScript - An Introduction
JavaScript Programming
Introduction to Bootstrap
Bootstrap ppt
Fundamental JavaScript [UTC, March 2014]
Introduction to JavaScript
Hello Cats: MobileWidgetCamp talk about mobile widgets
JavaScript and jQuery - Web Technologies (1019888BNR)
JQuery In Drupal
Jquery- One slide completing all JQuery
JQuery: JavaScript Library of the Future
webstudy jquery
Ad

Similar to jQuery Presentation (20)

PPTX
jQuery
PPTX
Introduction to jQuery
PDF
J query fundamentals
PPT
J query presentation
PPT
J query presentation
PPT
jQuery Fundamentals
PDF
DOM Scripting Toolkit - jQuery
PPTX
J Query The Write Less Do More Javascript Library
PPTX
Getting started with jQuery
PDF
The Dom Scripting Toolkit J Query
PPT
J query module1
PPTX
Javascript And J Query
PDF
Remy Sharp The DOM scripting toolkit jQuery
PPT
J query intro_29thsep_alok
PPTX
Jqueryppt (1)
PPTX
Web Development Introduction to jQuery
PPT
jQuery introduction
PPT
JavaScript Libraries
PDF
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
PDF
jQuery
Introduction to jQuery
J query fundamentals
J query presentation
J query presentation
jQuery Fundamentals
DOM Scripting Toolkit - jQuery
J Query The Write Less Do More Javascript Library
Getting started with jQuery
The Dom Scripting Toolkit J Query
J query module1
Javascript And J Query
Remy Sharp The DOM scripting toolkit jQuery
J query intro_29thsep_alok
Jqueryppt (1)
Web Development Introduction to jQuery
jQuery introduction
JavaScript Libraries
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
cuic standard and advanced reporting.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PPT
Teaching material agriculture food technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
KodekX | Application Modernization Development
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Approach and Philosophy of On baking technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
cuic standard and advanced reporting.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
NewMind AI Monthly Chronicles - July 2025
Teaching material agriculture food technology
MYSQL Presentation for SQL database connectivity
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KodekX | Application Modernization Development
Dropbox Q2 2025 Financial Results & Investor Presentation
Building Integrated photovoltaic BIPV_UPV.pdf
Understanding_Digital_Forensics_Presentation.pptx
Big Data Technologies - Introduction.pptx
Spectral efficient network and resource selection model in 5G networks
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Approach and Philosophy of On baking technology
20250228 LYD VKU AI Blended-Learning.pptx
Review of recent advances in non-invasive hemoglobin estimation
Per capita expenditure prediction using model stacking based on satellite ima...

jQuery Presentation

Editor's Notes

  • #2: Talk a little about JavaScriptHow well do you know JavaScript?Do we really understand it?How many have done advanced stuff with javascript?Used in different platformsPdfPhotoshopFireworks
  • #6: Unobtrusive JavaScriptLess code
  • #8: Unobtrusive JavaScriptLess code
  • #9: Best practice to indent your code
  • #11: Does not rely on the browser to match the elementsGood for webforms that does the weird ID thing
  • #12: Cross browser up until ie 6
  • #13: Functions are omnipresent
  • #17: Conducive tothe way web pages work.Events are useful, but rediculously hard to implmeent
  • #18: Conducive tothe way web pages work.Events are useful, but rediculously hard to implmeent