SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
www.webstackacademy.com
Introduction
jQuery
www.webstackacademy.comwww.webstackacademy.com
Introduction to jQuery
(Write less, Do more)
www.webstackacademy.com
What is a jQuery?
• jQuery (https://jquery.com/) is a lightweight, feature rich JavaScript library
• jQuery provides easy-to-use APIs to achieve the following:
o Manipulate HTML, CSS and DOM
o Handling HTML events
o Applying effects and animations
o AJAX
o Utilities
• This is one of the most popularly used OpenSource libraries
• Developers can do more with lesser number of lines of code, compared with vanilla JavaScript
www.webstackacademy.com
jQuery is very popular
• Most popular and extendable library for websites and mobile single page app development
• As of June 2018, jQuery is used on 73% of the top 1 million websites, and by 22.4% of overall
number of websites
• Most of the big companies (ex: Google) use jQuery library and host jQuery CDN (Both Google
and Microsoft)
• jQuery simplifies the syntax for finding, selecting, and manipulating DOM elements
• Supported by all modern browsers
www.webstackacademy.com
History of jQuery
• Originally created in Jan 2006 at a BarCamp by John
Resig (who became very popular for his work in
jQuery)
• Official major releases were made in the following
time-lines:
o 1.0 - Aug 2006
o 2.0 - Jan 2014
o 3.0 - Jun 2016
o 3.3.1 - Jan 2018 (which we will be using!)
• The jQuery team also developed jQuery mobile (for
mobile / touch devices) and jQuery UI (for developing
GUI) which has also become popular
www.webstackacademy.com
jQuery CDN
• Both Google and Microsoft host jQuery, links are provided below
Google CDN :
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
</script>
Microsoft CDN :
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js">
</script>
• For our learning, you can either use CDN or include a local copy of jQuery library
• Local downloaded copy is available at Google Drive
www.webstackacademy.com
jQuery Development Principles
• P1: Separation of HTML and JS
o jQuery library provides simple syntax for handling DOMs (Ex: Events)
o Hence, developers can avoid adding HTML event attributes to call JavaScript functions
o By this way JavaScript code can be completely separated code from HTML
• P2: Elimination of cross-browser incompatibilities
o The JavaScript engines of different browsers differ from each other
o Therefore, JavaScript code that works for one browser may not work for another
o jQuery handles all these cross-browser inconsistencies and provides a consistent interface
that works across different browsers
• P3: Extensibility
o New events, elements, and methods can be easily added and then reused as a plugin
www.webstackacademy.comwww.webstackacademy.com
jQuery syntax
(Getting hands-on)
www.webstackacademy.com
jQuery syntax
• The jQuery syntax is tailored to select HTML elements and performing some action on them
• Actions can be of varied in nature (ex: DOM manipulation, events etc..) which we will learn in
subsequent chapters
Syntax : $(selector).action()
Selector : this | id | class | element
$(this).action(); // Take action on current element
$(“div”).action(); // Take action on all divisions
$(“.abc”).action(); // Take action on all abc class
www.webstackacademy.com
jQuery syntax
• The $ used is actually a jQuery function
<script src="../jquery/jquery-3.3.1.min.js"
type="text/javascript"></script>
<script>
/* If you remove jQuery inclusion above, you will get undefined here */
document.write("Type of $ = " + typeof $);
if($ == jQuery) {
document.write("<br>$ Function is referencing to jQuery ");
}
</script>
www.webstackacademy.com
jQuery ready event
• Before accessing any element with jQuery, the DOM tree should be completely created
• There could be following possible failures if document is not fully loaded
o Finding an element that is not created
o Hiding an element that is not created
• jQuery detects the state of readiness of document then perform actions
<script>
$(document).ready(function() {
document.write("Welcome to jQuery...");
document.write("DOM is created...");
});
</script>
www.webstackacademy.com
jQuery load event
• Sometimes you may want the entire window to be loaded
• Hence use the "load" method
<script>
$(window).on("load", function() {
document.write("Window loaded!!")
});
</script>
www.webstackacademy.com
jQuery passing named functions
• U can also pass named functions to jQuery as follows
<script>
$(document).ready( myFunc );
// Calling your named function
function myFunc() {
console.log("DOM loaded");
}
</script>
www.webstackacademy.com
jQuery no-conflict mode
• By default, jQuery uses $ as a shortcut for jQuery
• Thus, if you are using another JavaScript library that uses the $ variable, you can run into
conflicts with jQuery
• In order to avoid these conflicts, you need to put jQuery in no-conflict mode immediately after
it is loaded onto the page and before you attempt to use jQuery in your page
www.webstackacademy.com
jQuery no-conflict mode
<script>
/* Creating alias for jQuery function */
jQuery.noConflict();
jQuery(document).ready(function( $ ) {
/* You can use the locally-scoped $ here */
$( "#hidden-para" ).hide();
console.log("jQuery in no-conflict mode");
});
/* You can call other 3rd party library functions here
* $(document).thirdPartyFunc();
* The $ above is 3rd party function reference.
*/
</script>
www.webstackacademy.com
WebStack Academy
#83, Farah Towers,
1st Floor, MG Road,
Bangalore – 560001
M: +91-809 555 7332
E: training@webstackacademy.com
WSA in Social Media:

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
 
3. Java Script
3. Java Script3. Java Script
3. Java Script
 
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
 JavaScript - Chapter 9 - TypeConversion and Regular Expressions  JavaScript - Chapter 9 - TypeConversion and Regular Expressions
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
 
Dom
Dom Dom
Dom
 
Java 8 lambda
Java 8 lambdaJava 8 lambda
Java 8 lambda
 
JavaScript: Events Handling
JavaScript: Events HandlingJavaScript: Events Handling
JavaScript: Events Handling
 
jQuery
jQueryjQuery
jQuery
 
jQuery
jQueryjQuery
jQuery
 
CSS
CSSCSS
CSS
 
JavaScript - Chapter 3 - Introduction
 JavaScript - Chapter 3 - Introduction JavaScript - Chapter 3 - Introduction
JavaScript - Chapter 3 - Introduction
 
Java script ppt
Java script pptJava script ppt
Java script ppt
 
6. Utilización del modelo de objetos del documento (DOM)
6. Utilización del modelo de objetos del documento (DOM)6. Utilización del modelo de objetos del documento (DOM)
6. Utilización del modelo de objetos del documento (DOM)
 
PHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginnersPHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginners
 
JavaScript Promises
JavaScript PromisesJavaScript Promises
JavaScript Promises
 
jQuery PPT
jQuery PPTjQuery PPT
jQuery PPT
 
Php
PhpPhp
Php
 
Lambda Expressions in Java
Lambda Expressions in JavaLambda Expressions in Java
Lambda Expressions in Java
 
Java script
Java scriptJava script
Java script
 
javascript.ppt
javascript.pptjavascript.ppt
javascript.ppt
 
JS Event Loop
JS Event LoopJS Event Loop
JS Event Loop
 

Ähnlich wie jQuery - Chapter 1 - Introduction

J query presentation
J query presentationJ query presentation
J query presentation
akanksha17
 
J query presentation
J query presentationJ query presentation
J query presentation
sawarkar17
 
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
Mark Roden
 

Ähnlich wie jQuery - Chapter 1 - Introduction (20)

Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQuery
 
J query presentation
J query presentationJ query presentation
J query presentation
 
J query presentation
J query presentationJ query presentation
J query presentation
 
Jquery beltranhomewrok
Jquery beltranhomewrokJquery beltranhomewrok
Jquery beltranhomewrok
 
Jquery beltranhomewrok
Jquery beltranhomewrokJquery beltranhomewrok
Jquery beltranhomewrok
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to Jquery
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPages
 
What is jQuery?
What is jQuery?What is jQuery?
What is jQuery?
 
Jqueryppt (1)
Jqueryppt (1)Jqueryppt (1)
Jqueryppt (1)
 
Javascript libraries
Javascript librariesJavascript libraries
Javascript libraries
 
J query resh
J query reshJ query resh
J query resh
 
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
 
Upstate CSCI 450 jQuery
Upstate CSCI 450 jQueryUpstate CSCI 450 jQuery
Upstate CSCI 450 jQuery
 
JQuery UI
JQuery UIJQuery UI
JQuery UI
 
Lesson 09
Lesson 09Lesson 09
Lesson 09
 
Lesson 09
Lesson 09Lesson 09
Lesson 09
 
Intro to jQuery @ Startup Institute
Intro to jQuery @ Startup InstituteIntro to jQuery @ Startup Institute
Intro to jQuery @ Startup Institute
 
JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)
 
Ise312 Ec Presentation Jquery
Ise312 Ec Presentation JqueryIse312 Ec Presentation Jquery
Ise312 Ec Presentation Jquery
 
jQuery - Web Engineering
jQuery - Web Engineering jQuery - Web Engineering
jQuery - Web Engineering
 

Mehr von WebStackAcademy

Mehr von WebStackAcademy (20)

Webstack Academy - Course Demo Webinar and Placement Journey
Webstack Academy - Course Demo Webinar and Placement JourneyWebstack Academy - Course Demo Webinar and Placement Journey
Webstack Academy - Course Demo Webinar and Placement Journey
 
WSA: Scaling Web Service to Handle Millions of Requests per Second
WSA: Scaling Web Service to Handle Millions of Requests per SecondWSA: Scaling Web Service to Handle Millions of Requests per Second
WSA: Scaling Web Service to Handle Millions of Requests per Second
 
WSA: Course Demo Webinar - Full Stack Developer Course
WSA: Course Demo Webinar - Full Stack Developer CourseWSA: Course Demo Webinar - Full Stack Developer Course
WSA: Course Demo Webinar - Full Stack Developer Course
 
Career Building in AI - Technologies, Trends and Opportunities
Career Building in AI - Technologies, Trends and OpportunitiesCareer Building in AI - Technologies, Trends and Opportunities
Career Building in AI - Technologies, Trends and Opportunities
 
Webstack Academy - Internship Kick Off
Webstack Academy - Internship Kick OffWebstack Academy - Internship Kick Off
Webstack Academy - Internship Kick Off
 
Building Your Online Portfolio
Building Your Online PortfolioBuilding Your Online Portfolio
Building Your Online Portfolio
 
Front-End Developer's Career Roadmap
Front-End Developer's Career RoadmapFront-End Developer's Career Roadmap
Front-End Developer's Career Roadmap
 
Angular - Chapter 9 - Authentication and Authorization
Angular - Chapter 9 - Authentication and AuthorizationAngular - Chapter 9 - Authentication and Authorization
Angular - Chapter 9 - Authentication and Authorization
 
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesAngular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP Services
 
Angular - Chapter 6 - Firebase Integration
Angular - Chapter 6 - Firebase IntegrationAngular - Chapter 6 - Firebase Integration
Angular - Chapter 6 - Firebase Integration
 
Angular - Chapter 5 - Directives
 Angular - Chapter 5 - Directives Angular - Chapter 5 - Directives
Angular - Chapter 5 - Directives
 
Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event Handling
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - Components
 
Angular - Chapter 2 - TypeScript Programming
Angular - Chapter 2 - TypeScript Programming  Angular - Chapter 2 - TypeScript Programming
Angular - Chapter 2 - TypeScript Programming
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - Introduction
 
JavaScript - Chapter 10 - Strings and Arrays
 JavaScript - Chapter 10 - Strings and Arrays JavaScript - Chapter 10 - Strings and Arrays
JavaScript - Chapter 10 - Strings and Arrays
 
JavaScript - Chapter 15 - Debugging Techniques
 JavaScript - Chapter 15 - Debugging Techniques JavaScript - Chapter 15 - Debugging Techniques
JavaScript - Chapter 15 - Debugging Techniques
 
JavaScript - Chapter 14 - Form Handling
 JavaScript - Chapter 14 - Form Handling   JavaScript - Chapter 14 - Form Handling
JavaScript - Chapter 14 - Form Handling
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

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
 
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
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
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?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
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
 
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
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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
 

jQuery - Chapter 1 - Introduction

  • 3. www.webstackacademy.com What is a jQuery? • jQuery (https://jquery.com/) is a lightweight, feature rich JavaScript library • jQuery provides easy-to-use APIs to achieve the following: o Manipulate HTML, CSS and DOM o Handling HTML events o Applying effects and animations o AJAX o Utilities • This is one of the most popularly used OpenSource libraries • Developers can do more with lesser number of lines of code, compared with vanilla JavaScript
  • 4. www.webstackacademy.com jQuery is very popular • Most popular and extendable library for websites and mobile single page app development • As of June 2018, jQuery is used on 73% of the top 1 million websites, and by 22.4% of overall number of websites • Most of the big companies (ex: Google) use jQuery library and host jQuery CDN (Both Google and Microsoft) • jQuery simplifies the syntax for finding, selecting, and manipulating DOM elements • Supported by all modern browsers
  • 5. www.webstackacademy.com History of jQuery • Originally created in Jan 2006 at a BarCamp by John Resig (who became very popular for his work in jQuery) • Official major releases were made in the following time-lines: o 1.0 - Aug 2006 o 2.0 - Jan 2014 o 3.0 - Jun 2016 o 3.3.1 - Jan 2018 (which we will be using!) • The jQuery team also developed jQuery mobile (for mobile / touch devices) and jQuery UI (for developing GUI) which has also become popular
  • 6. www.webstackacademy.com jQuery CDN • Both Google and Microsoft host jQuery, links are provided below Google CDN : <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> Microsoft CDN : <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"> </script> • For our learning, you can either use CDN or include a local copy of jQuery library • Local downloaded copy is available at Google Drive
  • 7. www.webstackacademy.com jQuery Development Principles • P1: Separation of HTML and JS o jQuery library provides simple syntax for handling DOMs (Ex: Events) o Hence, developers can avoid adding HTML event attributes to call JavaScript functions o By this way JavaScript code can be completely separated code from HTML • P2: Elimination of cross-browser incompatibilities o The JavaScript engines of different browsers differ from each other o Therefore, JavaScript code that works for one browser may not work for another o jQuery handles all these cross-browser inconsistencies and provides a consistent interface that works across different browsers • P3: Extensibility o New events, elements, and methods can be easily added and then reused as a plugin
  • 9. www.webstackacademy.com jQuery syntax • The jQuery syntax is tailored to select HTML elements and performing some action on them • Actions can be of varied in nature (ex: DOM manipulation, events etc..) which we will learn in subsequent chapters Syntax : $(selector).action() Selector : this | id | class | element $(this).action(); // Take action on current element $(“div”).action(); // Take action on all divisions $(“.abc”).action(); // Take action on all abc class
  • 10. www.webstackacademy.com jQuery syntax • The $ used is actually a jQuery function <script src="../jquery/jquery-3.3.1.min.js" type="text/javascript"></script> <script> /* If you remove jQuery inclusion above, you will get undefined here */ document.write("Type of $ = " + typeof $); if($ == jQuery) { document.write("<br>$ Function is referencing to jQuery "); } </script>
  • 11. www.webstackacademy.com jQuery ready event • Before accessing any element with jQuery, the DOM tree should be completely created • There could be following possible failures if document is not fully loaded o Finding an element that is not created o Hiding an element that is not created • jQuery detects the state of readiness of document then perform actions <script> $(document).ready(function() { document.write("Welcome to jQuery..."); document.write("DOM is created..."); }); </script>
  • 12. www.webstackacademy.com jQuery load event • Sometimes you may want the entire window to be loaded • Hence use the "load" method <script> $(window).on("load", function() { document.write("Window loaded!!") }); </script>
  • 13. www.webstackacademy.com jQuery passing named functions • U can also pass named functions to jQuery as follows <script> $(document).ready( myFunc ); // Calling your named function function myFunc() { console.log("DOM loaded"); } </script>
  • 14. www.webstackacademy.com jQuery no-conflict mode • By default, jQuery uses $ as a shortcut for jQuery • Thus, if you are using another JavaScript library that uses the $ variable, you can run into conflicts with jQuery • In order to avoid these conflicts, you need to put jQuery in no-conflict mode immediately after it is loaded onto the page and before you attempt to use jQuery in your page
  • 15. www.webstackacademy.com jQuery no-conflict mode <script> /* Creating alias for jQuery function */ jQuery.noConflict(); jQuery(document).ready(function( $ ) { /* You can use the locally-scoped $ here */ $( "#hidden-para" ).hide(); console.log("jQuery in no-conflict mode"); }); /* You can call other 3rd party library functions here * $(document).thirdPartyFunc(); * The $ above is 3rd party function reference. */ </script>
  • 16. www.webstackacademy.com WebStack Academy #83, Farah Towers, 1st Floor, MG Road, Bangalore – 560001 M: +91-809 555 7332 E: training@webstackacademy.com WSA in Social Media: