SlideShare ist ein Scribd-Unternehmen logo
1 von 12
jQuery 101 John Bales, Software Engineer IT
JavaScript Abstraction DOM Manipulation UI Candy And More… What is jQuery
Who’s Using jQuery
<script> $(document).ready(function () {     $("#tabs").tabs(); }); </script> <div id="tabs" style="width:500px;">             <ul>                 <li><a href="#fragment-1"><span>Contact Info</span></a></li>                 <li><a href="#fragment-2"><span>Address Info</span></a></li>                 <li><a href="#fragment-3"><span>Vehicle Info</span></a></li>             </ul>             <div id="fragment-1"></div>             <div id="fragment-2"></div>             <div id="fragment-3"></div> </div> jQuery Plugins jQuery UI provides abstractions for low-level interaction and animation, advanced effects and high-level, themeable widgets, built on top of the jQuery JavaScript Library, that you can use to build highly interactive web applications.
jQuery Plugins
JavaScript Objects var Person = { FirstName: '', LastName: '', PhoneNumber: '', EmailAddress: '',     Address: {         Address1: '',         Address2: '',         City: '',         State: '',         Zip: ''     },     Vehicle: {         Class: '',         Make: '',         Model: '',         Year: '',         Color: ''     } };
Jquery Templates <script id="summaryTemplateView" type="text/x-jquery-tmpl"> <table>     <tr><td>Name:</td>         <td width="100%">${FirstName} ${LastName}</td>    </tr>     <tr><td>Email:</td>         <td>${EmailAddress}</td>    </tr>     <tr><td>Phone:</td>         <td>${PhoneNumber}</td>    </tr>     <tr><td>Address</td>         <td>${Address.Address1} ${Address.Address2} ${Address.City}, ${Address.State}. ${Address.Zip}</td>     </tr>     <tr><td>Vehicle:</td>         <td>${Vehicle.Color} ${Vehicle.Year} ${Vehicle.Make} ${Vehicle.Model} ${Vehicle.Class}</td>     </tr> </table> </script>
$.get("templates/summary.htm", function (templateBody) {                 $('#summaryTemplate').html(templateBody);                 $("#summaryTemplateView").tmpl(Person).appendTo("#summaryView"); Jquery Templates
Widget Factory (function ($) {     $.widget("ui.tab1", {         // default options         options: {             hidden: false         }, _create: function () { var self = this; var options = this.options; self._loadEventHandlers();         }, _init: function () { var self = this; var options = this.options; },        destroy: function () {             $.Widget.prototype.destroy.apply(this, arguments); // default destroy         }     }); } (jQuery)); It provides a flexible base for building complex, statefulplugins with a consistent API.
Widget Factory <script type="text/javascript">     $(document).ready(function () { $('#person_info').tab1(); }); </script> <div id="person_info">     <div id="person_form_container">         <form id="person_form" name="person_form">             <table>                 <tr><td>First Name:</td>                     <td><input type="text" id="firstname" name="firstname" /></td>                 </tr> <tr><td>Last Name:</td>                     <td><input type="text" id="lastname" name="lastname" /></td>                 </tr>                 <tr><td colspan="2" align="right"><input type="button" id="SavePersonInfo" value="Save" /></td>                 </tr>             </table>         </form>     </div>     <div id="personResult"></div> </div>
$.post() Load data from the server using a HTTP POST request. $(‘#selector’).load() Load data from the server and place the returned HTML into the matched element. $.get() Load data from the server using a HTTP GET request. AJAX
What is jQuery Who uses jQuery jQuery Plugins jQuery Templates Widget Factory AJAX QUESTIONS? Conclusion

Weitere ähnliche Inhalte

Was ist angesagt?

Ajax On S2 Odp
Ajax On S2 OdpAjax On S2 Odp
Ajax On S2 Odpghessler
 
Html Presentation Of Web Page Making
Html Presentation Of Web Page MakingHtml Presentation Of Web Page Making
Html Presentation Of Web Page MakingSandeep Supal
 
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Sergey Ilinsky
 
XQDT - XQuery Getting Momentum in Eclipse
XQDT - XQuery Getting Momentum in EclipseXQDT - XQuery Getting Momentum in Eclipse
XQDT - XQuery Getting Momentum in Eclipseguesteb3ec2
 
JavaScript APIs In Focus
JavaScript APIs In FocusJavaScript APIs In Focus
JavaScript APIs In FocusSergey Ilinsky
 
Quick Referance to WML
Quick Referance to WMLQuick Referance to WML
Quick Referance to WMLNitin Saswade
 
OpenSocial - GTUG Stockholm Meeting Oct 1 2009
OpenSocial - GTUG Stockholm Meeting Oct 1 2009OpenSocial - GTUG Stockholm Meeting Oct 1 2009
OpenSocial - GTUG Stockholm Meeting Oct 1 2009Jacob Gyllenstierna
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on RailsDiki Andeas
 
Yeni Metin Belgesi (3)
Yeni Metin Belgesi (3)Yeni Metin Belgesi (3)
Yeni Metin Belgesi (3)guest95153c
 
Adding commentary to essays my notes
Adding commentary to essays my notesAdding commentary to essays my notes
Adding commentary to essays my notesWendy Scruggs
 
Forum Presentation
Forum PresentationForum Presentation
Forum PresentationAngus Pratt
 
Intro to jQuery
Intro to jQueryIntro to jQuery
Intro to jQueryAlan Hecht
 

Was ist angesagt? (20)

Ajax On S2 Odp
Ajax On S2 OdpAjax On S2 Odp
Ajax On S2 Odp
 
Html Presentation Of Web Page Making
Html Presentation Of Web Page MakingHtml Presentation Of Web Page Making
Html Presentation Of Web Page Making
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
 
XQDT - XQuery Getting Momentum in Eclipse
XQDT - XQuery Getting Momentum in EclipseXQDT - XQuery Getting Momentum in Eclipse
XQDT - XQuery Getting Momentum in Eclipse
 
JavaScript APIs In Focus
JavaScript APIs In FocusJavaScript APIs In Focus
JavaScript APIs In Focus
 
mmiuc
mmiucmmiuc
mmiuc
 
Jquery
JqueryJquery
Jquery
 
Quick Referance to WML
Quick Referance to WMLQuick Referance to WML
Quick Referance to WML
 
OpenSocial - GTUG Stockholm Meeting Oct 1 2009
OpenSocial - GTUG Stockholm Meeting Oct 1 2009OpenSocial - GTUG Stockholm Meeting Oct 1 2009
OpenSocial - GTUG Stockholm Meeting Oct 1 2009
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
Html
HtmlHtml
Html
 
Yeni Metin Belgesi (3)
Yeni Metin Belgesi (3)Yeni Metin Belgesi (3)
Yeni Metin Belgesi (3)
 
บทที่ 3 เริ่มใช้งานโปรแกรม
บทที่ 3 เริ่มใช้งานโปรแกรมบทที่ 3 เริ่มใช้งานโปรแกรม
บทที่ 3 เริ่มใช้งานโปรแกรม
 
Adding commentary to essays my notes
Adding commentary to essays my notesAdding commentary to essays my notes
Adding commentary to essays my notes
 
Forum Presentation
Forum PresentationForum Presentation
Forum Presentation
 
Css
CssCss
Css
 
HTML 101
HTML 101HTML 101
HTML 101
 
Html Ppt
Html PptHtml Ppt
Html Ppt
 
Intro to jQuery
Intro to jQueryIntro to jQuery
Intro to jQuery
 

Ähnlich wie JQuery 101

Anvita Dynamic Fontson Web Feb2001
Anvita Dynamic Fontson Web Feb2001Anvita Dynamic Fontson Web Feb2001
Anvita Dynamic Fontson Web Feb2001guest6e7a1b1
 
Web APIs & Google APIs
Web APIs & Google APIsWeb APIs & Google APIs
Web APIs & Google APIsPamela Fox
 
Java Script
Java ScriptJava Script
Java Scriptsiddaram
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax componentsIgnacio Coloma
 
Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?goodfriday
 
Introduction into Struts2 jQuery Grid Tags
Introduction into Struts2 jQuery Grid TagsIntroduction into Struts2 jQuery Grid Tags
Introduction into Struts2 jQuery Grid TagsJohannes Geppert
 
Optimizing Drupal for Mobile Devices
Optimizing Drupal for Mobile DevicesOptimizing Drupal for Mobile Devices
Optimizing Drupal for Mobile DevicesSugree Phatanapherom
 
CSIS 138 Javascript Class1
CSIS 138 Javascript Class1CSIS 138 Javascript Class1
CSIS 138 Javascript Class1Teresa Pelkie
 
Php Calling Operators
Php Calling OperatorsPhp Calling Operators
Php Calling Operatorsmussawir20
 
03 Php Array String Functions
03 Php Array String Functions03 Php Array String Functions
03 Php Array String FunctionsGeshan Manandhar
 
JWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAXJWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAXHilary Mason
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On RailsWen-Tien Chang
 
Significant Characteristics In Planets Manfred Thaller
Significant Characteristics In Planets Manfred ThallerSignificant Characteristics In Planets Manfred Thaller
Significant Characteristics In Planets Manfred ThallerDigitalPreservationEurope
 

Ähnlich wie JQuery 101 (20)

Anvita Dynamic Fontson Web Feb2001
Anvita Dynamic Fontson Web Feb2001Anvita Dynamic Fontson Web Feb2001
Anvita Dynamic Fontson Web Feb2001
 
Ajax ons2
Ajax ons2Ajax ons2
Ajax ons2
 
Web APIs & Google APIs
Web APIs & Google APIsWeb APIs & Google APIs
Web APIs & Google APIs
 
Using Forms in Share
Using Forms in ShareUsing Forms in Share
Using Forms in Share
 
Java Script
Java ScriptJava Script
Java Script
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?
 
Introduction into Struts2 jQuery Grid Tags
Introduction into Struts2 jQuery Grid TagsIntroduction into Struts2 jQuery Grid Tags
Introduction into Struts2 jQuery Grid Tags
 
JSP Custom Tags
JSP Custom TagsJSP Custom Tags
JSP Custom Tags
 
Optimizing Drupal for Mobile Devices
Optimizing Drupal for Mobile DevicesOptimizing Drupal for Mobile Devices
Optimizing Drupal for Mobile Devices
 
Microsoft and jQuery
Microsoft and jQueryMicrosoft and jQuery
Microsoft and jQuery
 
CSIS 138 Javascript Class1
CSIS 138 Javascript Class1CSIS 138 Javascript Class1
CSIS 138 Javascript Class1
 
Front End on Rails
Front End on RailsFront End on Rails
Front End on Rails
 
Php Calling Operators
Php Calling OperatorsPhp Calling Operators
Php Calling Operators
 
HTML5 Web Forms
HTML5 Web FormsHTML5 Web Forms
HTML5 Web Forms
 
03 Php Array String Functions
03 Php Array String Functions03 Php Array String Functions
03 Php Array String Functions
 
JWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAXJWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAX
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On Rails
 
Php 3 1
Php 3 1Php 3 1
Php 3 1
 
Significant Characteristics In Planets Manfred Thaller
Significant Characteristics In Planets Manfred ThallerSignificant Characteristics In Planets Manfred Thaller
Significant Characteristics In Planets Manfred Thaller
 

Kürzlich hochgeladen

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

JQuery 101

  • 1. jQuery 101 John Bales, Software Engineer IT
  • 2. JavaScript Abstraction DOM Manipulation UI Candy And More… What is jQuery
  • 4. <script> $(document).ready(function () { $("#tabs").tabs(); }); </script> <div id="tabs" style="width:500px;"> <ul> <li><a href="#fragment-1"><span>Contact Info</span></a></li> <li><a href="#fragment-2"><span>Address Info</span></a></li> <li><a href="#fragment-3"><span>Vehicle Info</span></a></li> </ul> <div id="fragment-1"></div> <div id="fragment-2"></div> <div id="fragment-3"></div> </div> jQuery Plugins jQuery UI provides abstractions for low-level interaction and animation, advanced effects and high-level, themeable widgets, built on top of the jQuery JavaScript Library, that you can use to build highly interactive web applications.
  • 6. JavaScript Objects var Person = { FirstName: '', LastName: '', PhoneNumber: '', EmailAddress: '', Address: { Address1: '', Address2: '', City: '', State: '', Zip: '' }, Vehicle: { Class: '', Make: '', Model: '', Year: '', Color: '' } };
  • 7. Jquery Templates <script id="summaryTemplateView" type="text/x-jquery-tmpl"> <table> <tr><td>Name:</td> <td width="100%">${FirstName} ${LastName}</td> </tr> <tr><td>Email:</td> <td>${EmailAddress}</td> </tr> <tr><td>Phone:</td> <td>${PhoneNumber}</td> </tr> <tr><td>Address</td> <td>${Address.Address1} ${Address.Address2} ${Address.City}, ${Address.State}. ${Address.Zip}</td> </tr> <tr><td>Vehicle:</td> <td>${Vehicle.Color} ${Vehicle.Year} ${Vehicle.Make} ${Vehicle.Model} ${Vehicle.Class}</td> </tr> </table> </script>
  • 8. $.get("templates/summary.htm", function (templateBody) { $('#summaryTemplate').html(templateBody); $("#summaryTemplateView").tmpl(Person).appendTo("#summaryView"); Jquery Templates
  • 9. Widget Factory (function ($) { $.widget("ui.tab1", { // default options options: { hidden: false }, _create: function () { var self = this; var options = this.options; self._loadEventHandlers(); }, _init: function () { var self = this; var options = this.options; }, destroy: function () { $.Widget.prototype.destroy.apply(this, arguments); // default destroy } }); } (jQuery)); It provides a flexible base for building complex, statefulplugins with a consistent API.
  • 10. Widget Factory <script type="text/javascript"> $(document).ready(function () { $('#person_info').tab1(); }); </script> <div id="person_info"> <div id="person_form_container"> <form id="person_form" name="person_form"> <table> <tr><td>First Name:</td> <td><input type="text" id="firstname" name="firstname" /></td> </tr> <tr><td>Last Name:</td> <td><input type="text" id="lastname" name="lastname" /></td> </tr> <tr><td colspan="2" align="right"><input type="button" id="SavePersonInfo" value="Save" /></td> </tr> </table> </form> </div> <div id="personResult"></div> </div>
  • 11. $.post() Load data from the server using a HTTP POST request. $(‘#selector’).load() Load data from the server and place the returned HTML into the matched element. $.get() Load data from the server using a HTTP GET request. AJAX
  • 12. What is jQuery Who uses jQuery jQuery Plugins jQuery Templates Widget Factory AJAX QUESTIONS? Conclusion