SlideShare a Scribd company logo
1 of 39
How I Learned
              To Stop Worrying
              and Love jQuery
David Giard, Sogeti USA
     C# MVP
     MCTS, MCSD, MCSE, MCDBA
DavidGiard.com
@DavidGiard
B
E
F
O
R
E
A
F
T
E
R
JavaScript in your page
• <script type="text/javascript">
   …
  </script>

• <script type="text/javascript“
   src=“xxx.js">
  </script>
JavaScript: The Good Parts
• Interactive web pages
• Fast
• Ajax
JavaScript: The Bad Parts
• Cross-browser issues
• Cross-platform issues
JavaScript Frameworks
•   jQuery
     jQuery
•   Prototype
•   Dojo
•   Mootools
•   ExtJs
•   etc…
jQuery
•   JavaScript Abstraction
•   Cross-Browser
•   Built-In Functions
•   Fast
•   Unobtrusive
•   Popular
•   Ships with Visual Studio 2010 and 2012
jQuery Popularity




Source: http://royal.pingdom.com
jQuery Popularity




Source: http://royal.pingdom.com
jQuery Popularity
•   Twitter.com
•   Wikipedia.org
•   MLB.com
•   Amazon.com
•   Bing.com
•   Microsoft.com
•   Bit.ly
•   ESPN.com
•   Digg.com
•   Reddit.com
•   Netflix.com
•   WordPress.com
Unobtrusive JavaScript
• Obtrusive
  <a href=“” onclick=“DoSomething();”>
  Click Me
  </a>

• Unobtrusive
  <script type="text/javascript">
    $(document).ready(function(){
      $(“#Link1”).click(function(){
   DoSomething();
   });
  </script>
  <a href=“” id=“Link1”>
   Click Me
  </a>
Enable jQuery
• Download from jQuery.com
• <script
     type="text/javascript"
     src="scripts/jquery-1.8.3.min.js"></script>
Content Delivery Network
• <script
   type="text/javascript"
   src=“http://ajax.microsoft.com/ajax/jquery/jquery-1.8.3.min.js">
  </script>


• <script
   type="text/javascript"
   src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
  </script>

• <script
   type="text/javascript"
   src="http://code.jquery.com/jquery-1.8.3.min.js ">
  </script>
Non-Minified JavaScript
/*!
 * jQuery JavaScript Library v1.8.2
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright 2012 jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time)
 */
(function( window, undefined ) {
var
// A central reference to the root jQuery(document)
rootjQuery,

// The deferred used on DOM ready
Minified JavaScript
(function(a,b){function G(a){var b=F[a]={};return
p.each(a.split(s),function(a,c){b[c]=!0}),b}function
J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-
$1").toLowerCase();d=a.getAttribute(e);if(typeof
d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d
)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in
a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}fu
nction ba(){return!1}function bb(){return!0}function
bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do
a=a[b];while(a&&a.nodeType!==1);return a}function
bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var
e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return
a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return
a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return
p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var
b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.creat
eElement(b.pop());return c}function bC(a,b){return
a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}f
Document Object Model (DOM)
<html>
 <head>
  <title>My Page</title>
  <script
    type="text/javascript“
    src="http://code.jquery.com/jquery-1.7.1.min.js ">
                                     Document
  </script>
 </head>
 <body>        Head                                      Body
  <div>
    <p>
     Title a <a href="Page2.htm">link</a> Div
      This          Script                                      Div
    </p>
  </div>
  <div>                                   P                     UL
    Colors:
    <ul>
      <li>Red</li>
                                          A              LI     LI    LI
      <li>Orange</li>
      <li>Yellow</li>
    </ul>
  </div>
 </body>
</html>
Getting an Element
<script type="text/javaScript">
  var id = "Div1";
  var myDiv = document.GetElementById(id);
</script>
…
<div id="Div1">
  …
</div>
Cross-Browser
• Javascript
var id = "Div1";
var elm = null;
 if (document.getElementById)
 {
   elm = document.getElementById(id);
 }
 else if (document.all)
 {
   elm = document.all[id];
 }
 else if (document.layers)
 {
   elm = document.layers[id];
 }

• jQuery
var elm = $("#Div1");
jQuery Syntax
•   jQuery keyword
•   Selectors
•   Events
•   Functions / Methods
“jQuery” Keyword
•   jQuery
•   $
•   Represents the jQuery object
•   Indicates what follows is jQuery
Selectors
• Returns a set of objects
• Call method on each object
• Bind event to each object
CSS Selectors
h2 {
       font-family: "Calibri";               Tag name
       font-size: 66pt;
       font-weight: bold;
}
.FootNote {
       font-family: "Calibri";              Class name
       font-size: 18pt;
       font-weight: bold;
}
#MyElement {
       font-family: “Times New Roman";      Element ID
       font-color: red;
}
div#MyDiv {
       font-family: “Arial";             Combine selectors
       font-size: 48pt;
}
jQuery Selectors
• $(selector)
• where selector is:
Selector   Select by…      Example
 "#xxx"    Id              $("#MyDiv")
 ".xxx"    className       $(".MyClass")
 "xxx"     element type    $("a")
   xxx     variable name   $(document)
(document).ready
$(document).ready(function(){
     …
});
Events
$(document).ready(function(){
    $("#MyDiv").click(function(){
     …
    });
});
Methods
$(document).ready(function(){
    $(“#MyDiv”).click(function(){
     $(“a”).attr(“target”, “_blank”);
    });
});
Methods
$(document).ready(function(){
    $(“#MyDiv”).click(function(){
     $(“a”).attr(“target”, “_blank”);
    });
});
Methods
$(function(){
    $(“#MyDiv”).click(function(){
     $(“a”).attr(“target”, “_blank”);
    });
});
Combining Selectors
• Containership
  $(‘selector1 selector2’)
  Ex:
      $(‘div a’)
• Narrow scope
  $(‘Selector1Selector2’)
  Ex:
      $(‘a#MyLink’)
Set-based Selectors
•   $("div:first")
•   $("div:last")
•   $("div:even")
•   $("div:odd")
Ajax
• Call web service from jQuery
Ajax
$.ajax({
      url: "CustomerWs.asmx/GetCustomerName",
      dataType: "text",
      type: "POST",
      data: {},
      error: function (err) {
         // Code to run when error returned
      },
      success: function (data) {
         // Code to run when successfully returned
      }
Plug-Ins
• jQuery is extensible!
• jQueryUI
jQuery UI
Help!
• docs.jquery.com
• api.jquery.com
• jqueryui.com/demos
More resources
• http://codylindley.com/jqueryselectors/
• http://www.paulstovell.com/jquerypad
David Giard
• DavidGiard.com
• TechnologyAndFriends.com
• @DavidGiard.com
How I Learned to Stop Worrying and Love jQuery (Jan 2013)

More Related Content

What's hot

jQuery Presentation
jQuery PresentationjQuery Presentation
jQuery PresentationRod Johnson
 
jQuery introduction
jQuery introductionjQuery introduction
jQuery introductionTomi Juhola
 
jQuery Features to Avoid
jQuery Features to AvoidjQuery Features to Avoid
jQuery Features to Avoiddmethvin
 
JavaScript and jQuery Basics
JavaScript and jQuery BasicsJavaScript and jQuery Basics
JavaScript and jQuery BasicsKaloyan Kosev
 
Styling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS EditionStyling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS Editionbensmithett
 
Styling components with JavaScript
Styling components with JavaScriptStyling components with JavaScript
Styling components with JavaScriptbensmithett
 
Getting the Most Out of jQuery Widgets
Getting the Most Out of jQuery WidgetsGetting the Most Out of jQuery Widgets
Getting the Most Out of jQuery Widgetsvelveeta_512
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsMark Rackley
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQueryGunjan Kumar
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterpriseDave Artz
 
Harness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkHarness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkBorisMoore
 
JsViews - Next Generation jQuery Templates
JsViews - Next Generation jQuery TemplatesJsViews - Next Generation jQuery Templates
JsViews - Next Generation jQuery TemplatesBorisMoore
 

What's hot (20)

jQuery Presentation
jQuery PresentationjQuery Presentation
jQuery Presentation
 
jQuery introduction
jQuery introductionjQuery introduction
jQuery introduction
 
jQuery Features to Avoid
jQuery Features to AvoidjQuery Features to Avoid
jQuery Features to Avoid
 
JavaScript and jQuery Basics
JavaScript and jQuery BasicsJavaScript and jQuery Basics
JavaScript and jQuery Basics
 
Styling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS EditionStyling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS Edition
 
Styling components with JavaScript
Styling components with JavaScriptStyling components with JavaScript
Styling components with JavaScript
 
Learn css3
Learn css3Learn css3
Learn css3
 
jQuery
jQueryjQuery
jQuery
 
DirectToWeb 2.0
DirectToWeb 2.0DirectToWeb 2.0
DirectToWeb 2.0
 
Getting the Most Out of jQuery Widgets
Getting the Most Out of jQuery WidgetsGetting the Most Out of jQuery Widgets
Getting the Most Out of jQuery Widgets
 
ActiveDOM
ActiveDOMActiveDOM
ActiveDOM
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentials
 
22 j query1
22 j query122 j query1
22 j query1
 
J query intro_29thsep_alok
J query intro_29thsep_alokJ query intro_29thsep_alok
J query intro_29thsep_alok
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] Enterprise
 
Intro to jQuery
Intro to jQueryIntro to jQuery
Intro to jQuery
 
jQuery Essentials
jQuery EssentialsjQuery Essentials
jQuery Essentials
 
Harness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkHarness jQuery Templates and Data Link
Harness jQuery Templates and Data Link
 
JsViews - Next Generation jQuery Templates
JsViews - Next Generation jQuery TemplatesJsViews - Next Generation jQuery Templates
JsViews - Next Generation jQuery Templates
 

Viewers also liked

Gang announcements 2010 06
Gang announcements 2010 06Gang announcements 2010 06
Gang announcements 2010 06David Giard
 
Word Coach - Pitt Sept 08
Word Coach - Pitt Sept 08Word Coach - Pitt Sept 08
Word Coach - Pitt Sept 08r21270
 
A Solver Manager for energy systems planning within a Stochastic Optimization...
A Solver Manager for energy systems planning within a Stochastic Optimization...A Solver Manager for energy systems planning within a Stochastic Optimization...
A Solver Manager for energy systems planning within a Stochastic Optimization...Emilio L. Cano
 
Comparative study and non comparative study
Comparative study and non comparative studyComparative study and non comparative study
Comparative study and non comparative studyAbdullah al-kharusi
 
ACHPER QR Code Activity
ACHPER QR Code ActivityACHPER QR Code Activity
ACHPER QR Code Activitymrrobbo
 
Beths Powerpoint
Beths PowerpointBeths Powerpoint
Beths PowerpointJeff Paul
 
Conference Information 2008 Final
Conference Information 2008 FinalConference Information 2008 Final
Conference Information 2008 Finalguest0d8266
 
Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.
Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.
Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.Eugenio Agnello
 
Gang announcements 2011 07
Gang announcements 2011 07Gang announcements 2011 07
Gang announcements 2011 07David Giard
 
SEO Goes Natural and Social
SEO Goes Natural and SocialSEO Goes Natural and Social
SEO Goes Natural and SocialRichard Sink
 
The Business of Mobile Apps
The Business of Mobile AppsThe Business of Mobile Apps
The Business of Mobile AppsNorman Liang
 
Paresi mestresangelsmora
Paresi mestresangelsmoraParesi mestresangelsmora
Paresi mestresangelsmoraToni Monclus
 
Share Point Customization Delivered
Share Point   Customization DeliveredShare Point   Customization Delivered
Share Point Customization DeliveredDavid Giard
 
Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012
Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012 Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012
Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012 Eugenio Agnello
 
Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008
Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008
Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008jackthur
 
Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.
Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.
Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.Liana Lignou
 

Viewers also liked (20)

Calling Watson to Ward 8 Stat
Calling Watson to Ward 8 StatCalling Watson to Ward 8 Stat
Calling Watson to Ward 8 Stat
 
Gang announcements 2010 06
Gang announcements 2010 06Gang announcements 2010 06
Gang announcements 2010 06
 
Word Coach - Pitt Sept 08
Word Coach - Pitt Sept 08Word Coach - Pitt Sept 08
Word Coach - Pitt Sept 08
 
A Solver Manager for energy systems planning within a Stochastic Optimization...
A Solver Manager for energy systems planning within a Stochastic Optimization...A Solver Manager for energy systems planning within a Stochastic Optimization...
A Solver Manager for energy systems planning within a Stochastic Optimization...
 
Comparative study and non comparative study
Comparative study and non comparative studyComparative study and non comparative study
Comparative study and non comparative study
 
Global lesson Survey
Global lesson SurveyGlobal lesson Survey
Global lesson Survey
 
ACHPER QR Code Activity
ACHPER QR Code ActivityACHPER QR Code Activity
ACHPER QR Code Activity
 
Beths Powerpoint
Beths PowerpointBeths Powerpoint
Beths Powerpoint
 
Conference Information 2008 Final
Conference Information 2008 FinalConference Information 2008 Final
Conference Information 2008 Final
 
Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.
Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.
Internet, Idea e Impresa. Storia di una micro impresa in un paese di provincia.
 
Gang announcements 2011 07
Gang announcements 2011 07Gang announcements 2011 07
Gang announcements 2011 07
 
SEO Goes Natural and Social
SEO Goes Natural and SocialSEO Goes Natural and Social
SEO Goes Natural and Social
 
XML Compression Benchmark
XML Compression BenchmarkXML Compression Benchmark
XML Compression Benchmark
 
The Business of Mobile Apps
The Business of Mobile AppsThe Business of Mobile Apps
The Business of Mobile Apps
 
Paresi mestresangelsmora
Paresi mestresangelsmoraParesi mestresangelsmora
Paresi mestresangelsmora
 
Share Point Customization Delivered
Share Point   Customization DeliveredShare Point   Customization Delivered
Share Point Customization Delivered
 
Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012
Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012 Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012
Google Mostra Le Ricerche dei Viaggiatori su Maps - Estate 2012
 
Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008
Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008
Jack Thurston talk at EU budget and CAP conference: Prague, 11 December 2008
 
Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.
Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.
Aσφάλεια στο διαδίκτυο. Μια πρώτη προσέγγιση.
 
the great eight
the great eightthe great eight
the great eight
 

Similar to How I Learned to Stop Worrying and Love jQuery (Jan 2013)

Similar to How I Learned to Stop Worrying and Love jQuery (Jan 2013) (20)

Jquery
JqueryJquery
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)
 
bcgr3-jquery
bcgr3-jquerybcgr3-jquery
bcgr3-jquery
 
bcgr3-jquery
bcgr3-jquerybcgr3-jquery
bcgr3-jquery
 
Jquery fundamentals
Jquery fundamentalsJquery fundamentals
Jquery fundamentals
 
Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...
 
Jquery
JqueryJquery
Jquery
 
Introduction to jQuery (Ajax Exp 2006)
Introduction to jQuery (Ajax Exp 2006)Introduction to jQuery (Ajax Exp 2006)
Introduction to jQuery (Ajax Exp 2006)
 
Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)
 
Game jump: frontend introduction #1
Game jump: frontend introduction #1Game jump: frontend introduction #1
Game jump: frontend introduction #1
 
jQuery
jQueryjQuery
jQuery
 
JavaScript!
JavaScript!JavaScript!
JavaScript!
 
Jquery News Packages
Jquery News PackagesJquery News Packages
Jquery News Packages
 
J query training
J query trainingJ query training
J query training
 
jQuery
jQueryjQuery
jQuery
 
前端MVC之BackboneJS
前端MVC之BackboneJS前端MVC之BackboneJS
前端MVC之BackboneJS
 
Plone Interactivity
Plone InteractivityPlone Interactivity
Plone Interactivity
 
JQuery
JQueryJQuery
JQuery
 
Jquery In Rails
Jquery In RailsJquery In Rails
Jquery In Rails
 
Jquery introduction
Jquery introductionJquery introduction
Jquery introduction
 

More from David Giard

Data Visualization - CodeMash 2022
Data Visualization - CodeMash 2022Data Visualization - CodeMash 2022
Data Visualization - CodeMash 2022David Giard
 
Azure data factory
Azure data factoryAzure data factory
Azure data factoryDavid Giard
 
University of Texas lecture: Data Science Tools in Microsoft Azure
University of Texas lecture: Data Science Tools in Microsoft AzureUniversity of Texas lecture: Data Science Tools in Microsoft Azure
University of Texas lecture: Data Science Tools in Microsoft AzureDavid Giard
 
University of Texas, Data Science, March 29, 2018
University of Texas, Data Science, March 29, 2018University of Texas, Data Science, March 29, 2018
University of Texas, Data Science, March 29, 2018David Giard
 
Intro to cloud and azure
Intro to cloud and azureIntro to cloud and azure
Intro to cloud and azureDavid Giard
 
Azure and deep learning
Azure and deep learningAzure and deep learning
Azure and deep learningDavid Giard
 
Azure and Deep Learning
Azure and Deep LearningAzure and Deep Learning
Azure and Deep LearningDavid Giard
 
Cloud and azure and rock and roll
Cloud and azure and rock and rollCloud and azure and rock and roll
Cloud and azure and rock and rollDavid Giard
 
Own your own career advice from a veteran consultant
Own your own career   advice from a veteran consultantOwn your own career   advice from a veteran consultant
Own your own career advice from a veteran consultantDavid Giard
 
You and Your Tech Community
You and Your Tech CommunityYou and Your Tech Community
You and Your Tech CommunityDavid Giard
 
Microsoft Azure IoT overview
Microsoft Azure IoT overviewMicrosoft Azure IoT overview
Microsoft Azure IoT overviewDavid Giard
 
Cloud and azure and rock and roll
Cloud and azure and rock and rollCloud and azure and rock and roll
Cloud and azure and rock and rollDavid Giard
 
Big Data on azure
Big Data on azureBig Data on azure
Big Data on azureDavid Giard
 
Microsoft azure without microsoft
Microsoft azure without microsoftMicrosoft azure without microsoft
Microsoft azure without microsoftDavid Giard
 
Azure mobile apps
Azure mobile appsAzure mobile apps
Azure mobile appsDavid Giard
 
Building a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web ServicesBuilding a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web ServicesDavid Giard
 
Effective Data Visualization
Effective Data VisualizationEffective Data Visualization
Effective Data VisualizationDavid Giard
 
Angular2 and TypeScript
Angular2 and TypeScriptAngular2 and TypeScript
Angular2 and TypeScriptDavid Giard
 

More from David Giard (20)

Data Visualization - CodeMash 2022
Data Visualization - CodeMash 2022Data Visualization - CodeMash 2022
Data Visualization - CodeMash 2022
 
Azure data factory
Azure data factoryAzure data factory
Azure data factory
 
Azure functions
Azure functionsAzure functions
Azure functions
 
University of Texas lecture: Data Science Tools in Microsoft Azure
University of Texas lecture: Data Science Tools in Microsoft AzureUniversity of Texas lecture: Data Science Tools in Microsoft Azure
University of Texas lecture: Data Science Tools in Microsoft Azure
 
University of Texas, Data Science, March 29, 2018
University of Texas, Data Science, March 29, 2018University of Texas, Data Science, March 29, 2018
University of Texas, Data Science, March 29, 2018
 
Intro to cloud and azure
Intro to cloud and azureIntro to cloud and azure
Intro to cloud and azure
 
Azure and deep learning
Azure and deep learningAzure and deep learning
Azure and deep learning
 
Azure and Deep Learning
Azure and Deep LearningAzure and Deep Learning
Azure and Deep Learning
 
Custom vision
Custom visionCustom vision
Custom vision
 
Cloud and azure and rock and roll
Cloud and azure and rock and rollCloud and azure and rock and roll
Cloud and azure and rock and roll
 
Own your own career advice from a veteran consultant
Own your own career   advice from a veteran consultantOwn your own career   advice from a veteran consultant
Own your own career advice from a veteran consultant
 
You and Your Tech Community
You and Your Tech CommunityYou and Your Tech Community
You and Your Tech Community
 
Microsoft Azure IoT overview
Microsoft Azure IoT overviewMicrosoft Azure IoT overview
Microsoft Azure IoT overview
 
Cloud and azure and rock and roll
Cloud and azure and rock and rollCloud and azure and rock and roll
Cloud and azure and rock and roll
 
Big Data on azure
Big Data on azureBig Data on azure
Big Data on azure
 
Microsoft azure without microsoft
Microsoft azure without microsoftMicrosoft azure without microsoft
Microsoft azure without microsoft
 
Azure mobile apps
Azure mobile appsAzure mobile apps
Azure mobile apps
 
Building a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web ServicesBuilding a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web Services
 
Effective Data Visualization
Effective Data VisualizationEffective Data Visualization
Effective Data Visualization
 
Angular2 and TypeScript
Angular2 and TypeScriptAngular2 and TypeScript
Angular2 and TypeScript
 

Recently uploaded

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 

Recently uploaded (20)

Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 

How I Learned to Stop Worrying and Love jQuery (Jan 2013)

  • 1. How I Learned To Stop Worrying and Love jQuery David Giard, Sogeti USA C# MVP MCTS, MCSD, MCSE, MCDBA DavidGiard.com @DavidGiard
  • 4. JavaScript in your page • <script type="text/javascript"> … </script> • <script type="text/javascript“ src=“xxx.js"> </script>
  • 5. JavaScript: The Good Parts • Interactive web pages • Fast • Ajax
  • 6. JavaScript: The Bad Parts • Cross-browser issues • Cross-platform issues
  • 7. JavaScript Frameworks • jQuery jQuery • Prototype • Dojo • Mootools • ExtJs • etc…
  • 8. jQuery • JavaScript Abstraction • Cross-Browser • Built-In Functions • Fast • Unobtrusive • Popular • Ships with Visual Studio 2010 and 2012
  • 11. jQuery Popularity • Twitter.com • Wikipedia.org • MLB.com • Amazon.com • Bing.com • Microsoft.com • Bit.ly • ESPN.com • Digg.com • Reddit.com • Netflix.com • WordPress.com
  • 12. Unobtrusive JavaScript • Obtrusive <a href=“” onclick=“DoSomething();”> Click Me </a> • Unobtrusive <script type="text/javascript"> $(document).ready(function(){ $(“#Link1”).click(function(){ DoSomething(); }); </script> <a href=“” id=“Link1”> Click Me </a>
  • 13. Enable jQuery • Download from jQuery.com • <script type="text/javascript" src="scripts/jquery-1.8.3.min.js"></script>
  • 14. Content Delivery Network • <script type="text/javascript" src=“http://ajax.microsoft.com/ajax/jquery/jquery-1.8.3.min.js"> </script> • <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"> </script> • <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js "> </script>
  • 15. Non-Minified JavaScript /*! * jQuery JavaScript Library v1.8.2 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time) */ (function( window, undefined ) { var // A central reference to the root jQuery(document) rootjQuery, // The deferred used on DOM ready
  • 16. Minified JavaScript (function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"- $1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d )?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}fu nction ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.creat eElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}f
  • 17. Document Object Model (DOM) <html> <head> <title>My Page</title> <script type="text/javascript“ src="http://code.jquery.com/jquery-1.7.1.min.js "> Document </script> </head> <body> Head Body <div> <p> Title a <a href="Page2.htm">link</a> Div This Script Div </p> </div> <div> P UL Colors: <ul> <li>Red</li> A LI LI LI <li>Orange</li> <li>Yellow</li> </ul> </div> </body> </html>
  • 18. Getting an Element <script type="text/javaScript"> var id = "Div1"; var myDiv = document.GetElementById(id); </script> … <div id="Div1"> … </div>
  • 19. Cross-Browser • Javascript var id = "Div1"; var elm = null; if (document.getElementById) { elm = document.getElementById(id); } else if (document.all) { elm = document.all[id]; } else if (document.layers) { elm = document.layers[id]; } • jQuery var elm = $("#Div1");
  • 20. jQuery Syntax • jQuery keyword • Selectors • Events • Functions / Methods
  • 21. “jQuery” Keyword • jQuery • $ • Represents the jQuery object • Indicates what follows is jQuery
  • 22. Selectors • Returns a set of objects • Call method on each object • Bind event to each object
  • 23. CSS Selectors h2 { font-family: "Calibri"; Tag name font-size: 66pt; font-weight: bold; } .FootNote { font-family: "Calibri"; Class name font-size: 18pt; font-weight: bold; } #MyElement { font-family: “Times New Roman"; Element ID font-color: red; } div#MyDiv { font-family: “Arial"; Combine selectors font-size: 48pt; }
  • 24. jQuery Selectors • $(selector) • where selector is: Selector Select by… Example "#xxx" Id $("#MyDiv") ".xxx" className $(".MyClass") "xxx" element type $("a") xxx variable name $(document)
  • 26. Events $(document).ready(function(){ $("#MyDiv").click(function(){ … }); });
  • 27. Methods $(document).ready(function(){ $(“#MyDiv”).click(function(){ $(“a”).attr(“target”, “_blank”); }); });
  • 28. Methods $(document).ready(function(){ $(“#MyDiv”).click(function(){ $(“a”).attr(“target”, “_blank”); }); });
  • 29. Methods $(function(){ $(“#MyDiv”).click(function(){ $(“a”).attr(“target”, “_blank”); }); });
  • 30. Combining Selectors • Containership $(‘selector1 selector2’) Ex: $(‘div a’) • Narrow scope $(‘Selector1Selector2’) Ex: $(‘a#MyLink’)
  • 31. Set-based Selectors • $("div:first") • $("div:last") • $("div:even") • $("div:odd")
  • 32. Ajax • Call web service from jQuery
  • 33. Ajax $.ajax({ url: "CustomerWs.asmx/GetCustomerName", dataType: "text", type: "POST", data: {}, error: function (err) { // Code to run when error returned }, success: function (data) { // Code to run when successfully returned }
  • 34. Plug-Ins • jQuery is extensible! • jQueryUI
  • 38. David Giard • DavidGiard.com • TechnologyAndFriends.com • @DavidGiard.com

Editor's Notes

  1. Sour