SlideShare a Scribd company logo
1 of 13
BY: HARESH C. MAHTANI JR
BS-IT 3RD YEAR
jQuery
• What is JQuery
• is free, open source software licensed under
the MIT License. jQuery's syntax is designed to
make it easier to navigate a document,
selectDOM elements, create animations,
handle events, and develop Ajax
applications. jQuery also provides capabilities
for developers to create plug-inson top of the
JavaScript library. This enables developers to
create abstractions for low-level interaction
and animation, advanced effects and high-
level, theme-able widgets. The modular
approach to the jQuery library allows the
creation of powerful dynamic web pages
and web applications
JQuery
• Features of Jquery
• DOM element selections using the multi-browser open source selector engine Sizzle, a spin-off
of the jQuery project
• DOM traversal and modification (including support for CSS 1–3)
• DOM manipulation based on CSS selectors that uses node elements name and node elements
attributes (id and class) as criteria to build selectors
• Events
• Effects and animations
• AJAX
• Extensibility through plug-ins
• Utilities - such as user agent information, feature detection
• Compatibility methods that are natively available in modern browsers but need fall backs for
older ones - For example the inArray() and each() functions.
• Multi-browser (not to be confused with cross-browser) support.
JQuery
• The jQuery library is a single JavaScript
file, containing all of its common
DOM, event, effects, and Ajax functions. It
can be included within a web page by
linking to a local copy, or to one of the
many copies available from public servers.
jQuery has a CDN sponsored by Media
Temple(previously at Amazon).
Google and Microsoft host it as well.
The JQuery Library
<script type="text/javascript"
src="jquery.js"></script>
• It is also possible to include jQuery directly
from content delivery networks.
<script
src="http://ajax.googleapis.com/ajax/libs/j
query/1.9.1/jquery.min.js"></script>
Examples of How to include
JQuery
• jQuery has two usage styles:
• Via the $ function, which is a factory
method for the jQuery object. These
functions, often called commands,
are chainable as they all return jQuery
objects.
• Via $.-prefixed functions. These are utility
functions, which do not act upon the
jQuery object directly.
Usage Styles
• This is an example of a jquery being use to
add manipulation of multiple DOM nodes
beginning in a $ function being called with
a CSS selector string which results in a
Jquery object referencing matching
elements in an HTML
Examples of a Jquery
• Besides accessing DOM nodes
through jQuery object hierarchy, it is
also possible to create new DOM
elements if a string passed as the
argument to $() looks like HTML. For
example, this line finds an HTML
SELECT element with ID="carmakes",
and adds an OPTION element with
value "VAG" and text "Volkswagen"
• $("div.test").add("p.quote").addClass(
"blue").slideDown("slow");
Examples of a JQuery
• the methods prefixed with $. are
convenience methods or affect global
properties and behaviour.
• $('select#carmakes').append($('<option
/>').attr({value:"VAG"}).append("Volkswage
n"));
Examples of a JQuery
• This writes "234" to the document.
• $.each([1,2,3], function() {
document.write(this + 1); });
Examples of a JQuery
• This example posts the
data name=John and location=Boston to example.ph
p on the server. When this request finishes
successfully, the success function is called to alert the
user. If the request fails, it will alert the user to the
failure, the status of the request, and the specific error.
$.ajax({ type: "POST", url: "example.php", data:
"name=John&location=Boston" }).done( function(msg)
{ alert( "Data Saved: " + msg ); }).fail( function(
xmlHttpRequest, statusText, errorThrown ) { alert( "Your
form submission failed.nn" + "XML Http Request: " +
JSON.stringify( xmlHttpRequest ) + ",nStatus Text: " +
statusText + ",nError Thrown: " + errorThrown ); });
Examples of a JQuery
• JQuery's architecture allows developers to
create plug-in code to extend its
functionality. Currently there are thousands
of jQuery plug-ins available on the
web that cover a wide range of
functionality such as Ajax helpers, web
services, datagrids, dynamic
lists, XML and XSLT tools, drag and
drop, events, cookie handling, modal
windows, and even a jQuery-
based Commodore 64emulator.
jQuery plug-ins
• Wikipedia
• http://en.wikipedia.org/wiki/JQuery
Reference

More Related Content

What's hot

What's hot (16)

jQuery Effects
jQuery EffectsjQuery Effects
jQuery Effects
 
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
 
JavaScript JQUERY AJAX
JavaScript JQUERY AJAXJavaScript JQUERY AJAX
JavaScript JQUERY AJAX
 
Simplify AJAX using jQuery
Simplify AJAX using jQuerySimplify AJAX using jQuery
Simplify AJAX using jQuery
 
jQuery
jQueryjQuery
jQuery
 
jQuery - Chapter 5 - Ajax
jQuery - Chapter 5 -  AjaxjQuery - Chapter 5 -  Ajax
jQuery - Chapter 5 - Ajax
 
Web Development Introduction to jQuery
Web Development Introduction to jQueryWeb Development Introduction to jQuery
Web Development Introduction to jQuery
 
React JS - Introduction
React JS - IntroductionReact JS - Introduction
React JS - Introduction
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
jQuery
jQueryjQuery
jQuery
 
Ajax and Jquery
Ajax and JqueryAjax and Jquery
Ajax and Jquery
 
KnockoutJS and MVVM
KnockoutJS and MVVMKnockoutJS and MVVM
KnockoutJS and MVVM
 
jQuery
jQueryjQuery
jQuery
 
22 j query1
22 j query122 j query1
22 j query1
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
SharePoint and jQuery Essentials
SharePoint and jQuery EssentialsSharePoint and jQuery Essentials
SharePoint and jQuery Essentials
 

Similar to J query resh

J query presentation
J query presentationJ query presentation
J query presentationakanksha17
 
J query presentation
J query presentationJ query presentation
J query presentationsawarkar17
 
Top 45 jQuery Interview Questions and Answers | Edureka
Top 45 jQuery Interview Questions and Answers | EdurekaTop 45 jQuery Interview Questions and Answers | Edureka
Top 45 jQuery Interview Questions and Answers | EdurekaEdureka!
 
An introduction to DOM , JAVASCRIPT , JQUERY, AJAX and JSON
An introduction to DOM , JAVASCRIPT , JQUERY, AJAX and JSONAn introduction to DOM , JAVASCRIPT , JQUERY, AJAX and JSON
An introduction to DOM , JAVASCRIPT , JQUERY, AJAX and JSONSyed Moosa Kaleem
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to JqueryGurpreet singh
 
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
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQueryAnil Kumar
 
AJS UNIT-1 2021-converted.pdf
AJS UNIT-1 2021-converted.pdfAJS UNIT-1 2021-converted.pdf
AJS UNIT-1 2021-converted.pdfSreeVani74
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks TriviaCognizant
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesMark Roden
 
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...Thinqloud
 
Difference between java script and jquery
Difference between java script and jqueryDifference between java script and jquery
Difference between java script and jqueryUmar Ali
 
Introduction to Jquery
Introduction to Jquery Introduction to Jquery
Introduction to Jquery Tajendar Arora
 
Web Components v1
Web Components v1Web Components v1
Web Components v1Mike Wilcox
 
Building Smart Workflows - Dan Diebolt
Building Smart Workflows - Dan DieboltBuilding Smart Workflows - Dan Diebolt
Building Smart Workflows - Dan DieboltQuickBase, Inc.
 

Similar to J query resh (20)

Jquery beltranhomewrok
Jquery beltranhomewrokJquery beltranhomewrok
Jquery beltranhomewrok
 
J query presentation
J query presentationJ query presentation
J query presentation
 
J query presentation
J query presentationJ query presentation
J query presentation
 
Top 45 jQuery Interview Questions and Answers | Edureka
Top 45 jQuery Interview Questions and Answers | EdurekaTop 45 jQuery Interview Questions and Answers | Edureka
Top 45 jQuery Interview Questions and Answers | Edureka
 
An introduction to DOM , JAVASCRIPT , JQUERY, AJAX and JSON
An introduction to DOM , JAVASCRIPT , JQUERY, AJAX and JSONAn introduction to DOM , JAVASCRIPT , JQUERY, AJAX and JSON
An introduction to DOM , JAVASCRIPT , JQUERY, AJAX and JSON
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to 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)
 
JQuery UI
JQuery UIJQuery UI
JQuery UI
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQuery
 
AJS UNIT-1 2021-converted.pdf
AJS UNIT-1 2021-converted.pdfAJS UNIT-1 2021-converted.pdf
AJS UNIT-1 2021-converted.pdf
 
Jquery fundamentals
Jquery fundamentalsJquery fundamentals
Jquery fundamentals
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks Trivia
 
Web2 - jQuery
Web2 - jQueryWeb2 - jQuery
Web2 - jQuery
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages
 
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...
 
Difference between java script and jquery
Difference between java script and jqueryDifference between java script and jquery
Difference between java script and jquery
 
Introduction to Jquery
Introduction to Jquery Introduction to Jquery
Introduction to Jquery
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
 
Building Smart Workflows - Dan Diebolt
Building Smart Workflows - Dan DieboltBuilding Smart Workflows - Dan Diebolt
Building Smart Workflows - Dan Diebolt
 

Recently uploaded

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
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
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
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
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
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...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

J query resh

  • 1. BY: HARESH C. MAHTANI JR BS-IT 3RD YEAR jQuery
  • 2. • What is JQuery • is free, open source software licensed under the MIT License. jQuery's syntax is designed to make it easier to navigate a document, selectDOM elements, create animations, handle events, and develop Ajax applications. jQuery also provides capabilities for developers to create plug-inson top of the JavaScript library. This enables developers to create abstractions for low-level interaction and animation, advanced effects and high- level, theme-able widgets. The modular approach to the jQuery library allows the creation of powerful dynamic web pages and web applications JQuery
  • 3. • Features of Jquery • DOM element selections using the multi-browser open source selector engine Sizzle, a spin-off of the jQuery project • DOM traversal and modification (including support for CSS 1–3) • DOM manipulation based on CSS selectors that uses node elements name and node elements attributes (id and class) as criteria to build selectors • Events • Effects and animations • AJAX • Extensibility through plug-ins • Utilities - such as user agent information, feature detection • Compatibility methods that are natively available in modern browsers but need fall backs for older ones - For example the inArray() and each() functions. • Multi-browser (not to be confused with cross-browser) support. JQuery
  • 4. • The jQuery library is a single JavaScript file, containing all of its common DOM, event, effects, and Ajax functions. It can be included within a web page by linking to a local copy, or to one of the many copies available from public servers. jQuery has a CDN sponsored by Media Temple(previously at Amazon). Google and Microsoft host it as well. The JQuery Library
  • 5. <script type="text/javascript" src="jquery.js"></script> • It is also possible to include jQuery directly from content delivery networks. <script src="http://ajax.googleapis.com/ajax/libs/j query/1.9.1/jquery.min.js"></script> Examples of How to include JQuery
  • 6. • jQuery has two usage styles: • Via the $ function, which is a factory method for the jQuery object. These functions, often called commands, are chainable as they all return jQuery objects. • Via $.-prefixed functions. These are utility functions, which do not act upon the jQuery object directly. Usage Styles
  • 7. • This is an example of a jquery being use to add manipulation of multiple DOM nodes beginning in a $ function being called with a CSS selector string which results in a Jquery object referencing matching elements in an HTML Examples of a Jquery
  • 8. • Besides accessing DOM nodes through jQuery object hierarchy, it is also possible to create new DOM elements if a string passed as the argument to $() looks like HTML. For example, this line finds an HTML SELECT element with ID="carmakes", and adds an OPTION element with value "VAG" and text "Volkswagen" • $("div.test").add("p.quote").addClass( "blue").slideDown("slow"); Examples of a JQuery
  • 9. • the methods prefixed with $. are convenience methods or affect global properties and behaviour. • $('select#carmakes').append($('<option />').attr({value:"VAG"}).append("Volkswage n")); Examples of a JQuery
  • 10. • This writes "234" to the document. • $.each([1,2,3], function() { document.write(this + 1); }); Examples of a JQuery
  • 11. • This example posts the data name=John and location=Boston to example.ph p on the server. When this request finishes successfully, the success function is called to alert the user. If the request fails, it will alert the user to the failure, the status of the request, and the specific error. $.ajax({ type: "POST", url: "example.php", data: "name=John&location=Boston" }).done( function(msg) { alert( "Data Saved: " + msg ); }).fail( function( xmlHttpRequest, statusText, errorThrown ) { alert( "Your form submission failed.nn" + "XML Http Request: " + JSON.stringify( xmlHttpRequest ) + ",nStatus Text: " + statusText + ",nError Thrown: " + errorThrown ); }); Examples of a JQuery
  • 12. • JQuery's architecture allows developers to create plug-in code to extend its functionality. Currently there are thousands of jQuery plug-ins available on the web that cover a wide range of functionality such as Ajax helpers, web services, datagrids, dynamic lists, XML and XSLT tools, drag and drop, events, cookie handling, modal windows, and even a jQuery- based Commodore 64emulator. jQuery plug-ins