SlideShare a Scribd company logo
Jquery By – Hussain Fakhruddin Manish Singh
What is Jquery? jQuery is a fast and concise JavaScript Library. Simplifies HTML document traversing, event handling, animating, and ajax interactions for rapid web development. Designed to change the way that you write JavaScript. Lightweight tool.
Features Free and Open Source. Support for CSS3. Cross-browser support. Lots of inbuilt functions and plugins. Support for creating own plugins for users.
JavaScript and jQuery Jquery is a library bult on top of javascript. jQuery simplifies coding for developers. jQuery is NOT faster then javascript but makes the code look much elegent. Once you have done some work with jQuery coming back to JavaScript mght look painful.
Why Jquery Over JavaScript There are much more functions and plugins for developers. Even bigger functionalities can be achieved in less amount of coding. Provides better compatibility with different browsers. Ajax is made very easy with jquery. Easy to provide effects, animation, designs to the pages
Downloading Jquery jQuery can be downloaded either in minified form or uncompressed form. Download jQuery in minified form in below link :  http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.3.2.min.js . jQuery resources can be found at  http://docs.jquery.com .
Getting Started Put the downloaded jquery.js file after unzipping ( if needed) inside your application directory. Insert the following <script> tag in the <head> section of your HTMl file:  <script type=&quot;text/javascript&quot; src=&quot;jquery.js&quot;></script>  Now write the HTML code given in next slide and run it through any browser
Hello World Code using jQuery <html> <head> <script type=&quot;text/javascript&quot; src=&quot;jquery.js&quot;></script> <script type=&quot;text/javascript&quot;>  $(document).ready(function() {  $(&quot;a&quot;).click(function() {  alert(&quot;Hello World!&quot;);  });  });   </script> </head>  <body> <a href=&quot;&quot;>Link</a>   </body> </html>
Explanation of Code $(document).ready = window.onload of plain javascript. $(&quot;a&quot;) stands for <a> element of html. In the web page the word “Link” is displayed with a link. On clicking that link the jquery function will get called and an alert message is displayed.
$ Sign in jQuery or JavaScript A beginner, or even a seasoned JavaScript programmer may be slightly intimidated once spotting something as ambiguous as the  dollar sign  ($). Well,there is nothing mysterious about the $ sign, for it is just a variable (or an identifier) name and legal in Javascript. In JavaScript, the dollar sign commonly appears in variable definitions and function calls.
Making jQuery Simpler Jquery is all about making things simple for developers. So we can replace the $(document).ready part like below in the Hello World Example :  $(function() { $(&quot;a&quot;).click(function() {  alert(&quot;Hello world!&quot;); }); });
Types in jQuery JavaScript provides several built-in types.All of them are supported in jquery In addition to those, there are virtual types like Selectors, enhanced pseudo-types like Events and Functions. By default any variable is initialized with false.
String Type A string in JavaScript is an immutable object that contains none, one or many characters.  Immutable means, once created they cannot be changed. Ex :  - “ I am a string.” - typeof “Any String”; //o/p string
String Quoting A string can be defined using single or double quotes.  You can nest single quotes inside of double quotes, and vice versa. To mix double quotes with double quotes, the nested ones have to be escaped with a backslash.  Ex :  &quot;You make 'me' sad.“ 'Holy &quot;cranking&quot; moses!‘ &quot;<a href=\&quot;home\&quot;>Home</a>&quot;
String Functions A string in JavaScript has some built-in methods to manipulate the string . The result might be new string - or something else, eg. split returns an array. Ex : &quot;hello&quot;.charAt(0) // &quot;h&quot;  &quot;hello&quot;.toUpperCase() // &quot;HELLO&quot;  &quot;Hello&quot;.toLowerCase() // &quot;hello“ &quot;hello&quot;.replace(/e|o/g, &quot;x&quot;) // &quot;hxllx&quot;  &quot;1,2,3&quot;.split(&quot;,&quot;) // [&quot;1&quot;, &quot;2&quot;, &quot;3&quot;]
String Properties All strings have a length property.  Ex : &quot;Hello&quot;.length // 5  An empty string defaults to false:  Ex : !&quot;&quot; // true   !&quot;hello&quot; // false !&quot;true&quot; // false   !new Boolean(false) // false
Numbers Numbers are double-precision 64-bit format IEEE 754 values.  They are immutable, just as strings. All operators common in c-based languages are available to work with numbers (+, -, *, /, %, =, +=, -=, *=, /=, ++, --).  Ex : typeof 12 // &quot;number&quot;
More on Numbers JavaScript provides utilities to work with numbers in the Math object. Ex : Math.PI // 3.141592653589793 Math.cos(Math.PI) // -1  If a number is zero, it defaults to false. Ex :  !0 // true   !1 // false
Continued… Parsing Numbers :  parseInt and parseFloat help parsing strings into numbers. Both do some implicit conversion if the base isn't specified. Ex : parseInt(&quot;123&quot;) = 123 (implicit decimal)  parseInt(&quot;010&quot;) = 8 (implicit octal) parseInt(&quot;0xCAFE&quot;) = 51966(implicit hex) parseInt(&quot;010&quot;, 10) = 10 (explicit decimal) parseInt(&quot;11&quot;, 2) = 3 (explicit binary)
Continued… Numbers to Strings :  When appending numbers to string, the result is always a string.   If you want to add numbers and then append them to a string, put parentheses around them. Ex : &quot;&quot; + 1 + 2; // &quot;12“ &quot;&quot; + (1 + 2); // &quot;3&quot;
NaN and Infinity Parsing something that isn't a number results in NaN.  Division by zero results in Infinity. Both NaN and Infinity are of type &quot;number“. Ex : parseInt(&quot;hello&quot;, 10) // NaN  isNaN(parseInt(&quot;hello&quot;, 10)) // true 1 / 0 // Infinity  NaN == NaN // false  Infinity == Infinity // true
Objects Javascript supports Object Orientation. Object can be crated in following way : var x = { };  var y = {  name: “Manish&quot;,  age: 24 };  You can write and read properties of an object using the dot notation. Ex : x.name = y.name + &quot; Singh&quot;  // “Manish Singh&quot;
Arrays Collection of data into a single variable. Ex : x = [1,2,3]; The type of an array is &quot;object&quot; . You write and read object properties using the array notation also. It allows you to dynamically choose the property.
Continued An array, no matter if it has elements or not, never defaults to false . Ex : var operations = {  increase: &quot;++&quot;,  decrease: &quot;--&quot; }  var operation = &quot;increase&quot;; operations[operation]  // &quot;++&quot;; operations[&quot;multiply&quot;]  = &quot;*&quot;;  // &quot;*&quot;
Iteration  Apart from normal javascript loops jquery support many advanced iterations. jQuery provides a generic each-function to iterate over properties of objects, as well as elements of arrays Ex : jQuery.each(obj, function(key, value) {  console.log(&quot;key&quot;, key, &quot;value&quot;, value); });
Function A function in JavaScript can be either named or anonymous. An anonymous function can be assigned to a variable or passed to a method.  The type of a function is &quot;function&quot;.  Ex : function named() { }  var handler = function() { }
More on Functions Inside a function a special variable &quot;arguments&quot; is always available.  It's similar to an array in that it has a length property, but it lacks the built-in methods of an array.  The arguments object also has a callee property, which refers to the function you're inside of.
Examples function log(x) {  console.log(typeof x,arguments.length);  }  log(); // &quot;undefined&quot;, 0  log(1); // &quot;number&quot;, 1  log(&quot;1&quot;, &quot;2&quot;, &quot;3&quot;); // &quot;string&quot;, 3  var awesome = function() {  return arguments.callee  }  awesome() == awesome  // true
Scope and Closures In JavaScript, all variables defined inside a function are only visible inside that function scope.   Closures are created whenever a variable that is defined outside the current scope is accessed from within some inner scope.
Example // global  var x = 0;  (function() { // private  var x = 1;  console.log(x); // 1  })();  console.log(x); // 0
function create(){  var counter = 0;  return { increment: function() { counter++;  }, print: function() { console.log(counter);  } } }  var c = create();  c.increment();  c.print(); // 1
Callback A callback is a plain JavaScript function passed to some method as an argument or option.  Some callbacks are just events, called to give the user a chance to react when a certain state is triggered.  jQuery's event system uses such callbacks everywhere.
Example of callback $(&quot;body&quot;).click(function(event) { console.log(&quot;clicked: &quot; + event.target); });  $(&quot;#myform&quot;).submit(function() { return false; });
References http://www.tutsdeck.com/tutorial/2/jquery-tutorial-beginners/ http://my123web.blogspot.com/search/label/jQuery http://jquery-howto.blogspot.com/2009/06/jquery-beginner-tutorials.html http://docs.jquery.com http://www.authenticsociety.com/blog/JavaScript_DollarSign
Thank You

More Related Content

What's hot (20)

Java script
Java scriptJava script
Java script
Shyam Khant
 
JavaScript Workshop
JavaScript WorkshopJavaScript Workshop
JavaScript Workshop
Pamela Fox
 
Java script basics
Java script basicsJava script basics
Java script basics
John Smith
 
Eugene Andruszczenko: jQuery
Eugene Andruszczenko: jQueryEugene Andruszczenko: jQuery
Eugene Andruszczenko: jQuery
Refresh Events
 
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to Javascript
Anjan Banda
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]
Aaron Gustafson
 
JavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UX
JWORKS powered by Ordina
 
JavaScript Basics
JavaScript BasicsJavaScript Basics
JavaScript Basics
Mats Bryntse
 
Introduction to JQuery
Introduction to JQueryIntroduction to JQuery
Introduction to JQuery
MobME Technical
 
Prototype js
Prototype jsPrototype js
Prototype js
mussawir20
 
Javascript basics for automation testing
Javascript  basics for automation testingJavascript  basics for automation testing
Javascript basics for automation testing
Vikas Thange
 
JavaScript Tutorial
JavaScript  TutorialJavaScript  Tutorial
JavaScript Tutorial
Bui Kiet
 
Javascript Basics
Javascript BasicsJavascript Basics
Javascript Basics
msemenistyi
 
5 Tips for Better JavaScript
5 Tips for Better JavaScript5 Tips for Better JavaScript
5 Tips for Better JavaScript
Todd Anglin
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
Jussi Pohjolainen
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
Manvendra Singh
 
Lab#1 - Front End Development
Lab#1 - Front End DevelopmentLab#1 - Front End Development
Lab#1 - Front End Development
Walid Ashraf
 
Fundamental JavaScript [In Control 2009]
Fundamental JavaScript [In Control 2009]Fundamental JavaScript [In Control 2009]
Fundamental JavaScript [In Control 2009]
Aaron Gustafson
 
Combres
CombresCombres
Combres
Buu Nguyen
 
A Re-Introduction to JavaScript
A Re-Introduction to JavaScriptA Re-Introduction to JavaScript
A Re-Introduction to JavaScript
Simon Willison
 
JavaScript Workshop
JavaScript WorkshopJavaScript Workshop
JavaScript Workshop
Pamela Fox
 
Java script basics
Java script basicsJava script basics
Java script basics
John Smith
 
Eugene Andruszczenko: jQuery
Eugene Andruszczenko: jQueryEugene Andruszczenko: jQuery
Eugene Andruszczenko: jQuery
Refresh Events
 
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to Javascript
Anjan Banda
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]
Aaron Gustafson
 
JavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UX
JWORKS powered by Ordina
 
Javascript basics for automation testing
Javascript  basics for automation testingJavascript  basics for automation testing
Javascript basics for automation testing
Vikas Thange
 
JavaScript Tutorial
JavaScript  TutorialJavaScript  Tutorial
JavaScript Tutorial
Bui Kiet
 
Javascript Basics
Javascript BasicsJavascript Basics
Javascript Basics
msemenistyi
 
5 Tips for Better JavaScript
5 Tips for Better JavaScript5 Tips for Better JavaScript
5 Tips for Better JavaScript
Todd Anglin
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
Manvendra Singh
 
Lab#1 - Front End Development
Lab#1 - Front End DevelopmentLab#1 - Front End Development
Lab#1 - Front End Development
Walid Ashraf
 
Fundamental JavaScript [In Control 2009]
Fundamental JavaScript [In Control 2009]Fundamental JavaScript [In Control 2009]
Fundamental JavaScript [In Control 2009]
Aaron Gustafson
 
A Re-Introduction to JavaScript
A Re-Introduction to JavaScriptA Re-Introduction to JavaScript
A Re-Introduction to JavaScript
Simon Willison
 

Similar to Jquery 1 (20)

AJS UNIT-1 2021-converted.pdf
AJS UNIT-1 2021-converted.pdfAJS UNIT-1 2021-converted.pdf
AJS UNIT-1 2021-converted.pdf
SreeVani74
 
JavaScript Needn't Hurt!
JavaScript Needn't Hurt!JavaScript Needn't Hurt!
JavaScript Needn't Hurt!
Thomas Kjeldahl Nilsson
 
JavaScript Neednt Hurt - JavaBin talk
JavaScript Neednt Hurt - JavaBin talkJavaScript Neednt Hurt - JavaBin talk
JavaScript Neednt Hurt - JavaBin talk
Thomas Kjeldahl Nilsson
 
UNIT 1 (7).pptx
UNIT 1 (7).pptxUNIT 1 (7).pptx
UNIT 1 (7).pptx
DrDhivyaaCRAssistant
 
JavaScript
JavaScriptJavaScript
JavaScript
Doncho Minkov
 
Handout - Introduction to Programming
Handout - Introduction to ProgrammingHandout - Introduction to Programming
Handout - Introduction to Programming
Cindy Royal
 
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
Syed Moosa Kaleem
 
All of Javascript
All of JavascriptAll of Javascript
All of Javascript
Togakangaroo
 
All of javascript
All of javascriptAll of javascript
All of javascript
Togakangaroo
 
gdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptxgdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptx
sandeshshahapur
 
Learning About JavaScript (…and its little buddy, JQuery!)
Learning About JavaScript (…and its little buddy, JQuery!)Learning About JavaScript (…and its little buddy, JQuery!)
Learning About JavaScript (…and its little buddy, JQuery!)
Julie Meloni
 
JavaScript and jQuery Fundamentals
JavaScript and jQuery FundamentalsJavaScript and jQuery Fundamentals
JavaScript and jQuery Fundamentals
BG Java EE Course
 
eXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction TrainingeXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction Training
Hoat Le
 
Java script
Java scriptJava script
Java script
Adrian Caetano
 
Week3
Week3Week3
Week3
Will Gaybrick
 
Java script
 Java script Java script
Java script
bosybosy
 
Lecture 03 - JQuery.pdf
Lecture 03 - JQuery.pdfLecture 03 - JQuery.pdf
Lecture 03 - JQuery.pdf
Lê Thưởng
 
jQuery introduction
jQuery introductionjQuery introduction
jQuery introduction
Tomi Juhola
 
Js types
Js typesJs types
Js types
LearningTech
 
Java script final presentation
Java script final presentationJava script final presentation
Java script final presentation
Adhoura Academy
 
AJS UNIT-1 2021-converted.pdf
AJS UNIT-1 2021-converted.pdfAJS UNIT-1 2021-converted.pdf
AJS UNIT-1 2021-converted.pdf
SreeVani74
 
Handout - Introduction to Programming
Handout - Introduction to ProgrammingHandout - Introduction to Programming
Handout - Introduction to Programming
Cindy Royal
 
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
Syed Moosa Kaleem
 
gdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptxgdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptx
sandeshshahapur
 
Learning About JavaScript (…and its little buddy, JQuery!)
Learning About JavaScript (…and its little buddy, JQuery!)Learning About JavaScript (…and its little buddy, JQuery!)
Learning About JavaScript (…and its little buddy, JQuery!)
Julie Meloni
 
JavaScript and jQuery Fundamentals
JavaScript and jQuery FundamentalsJavaScript and jQuery Fundamentals
JavaScript and jQuery Fundamentals
BG Java EE Course
 
eXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction TrainingeXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction Training
Hoat Le
 
Java script
 Java script Java script
Java script
bosybosy
 
Lecture 03 - JQuery.pdf
Lecture 03 - JQuery.pdfLecture 03 - JQuery.pdf
Lecture 03 - JQuery.pdf
Lê Thưởng
 
jQuery introduction
jQuery introductionjQuery introduction
jQuery introduction
Tomi Juhola
 
Java script final presentation
Java script final presentationJava script final presentation
Java script final presentation
Adhoura Academy
 

Recently uploaded (20)

Unit Kali NetHunter is the official Kali Linux penetration testing platform f...
Unit Kali NetHunter is the official Kali Linux penetration testing platform f...Unit Kali NetHunter is the official Kali Linux penetration testing platform f...
Unit Kali NetHunter is the official Kali Linux penetration testing platform f...
ChatanBawankar
 
Low Vison introduction from Aligarh Muslim University
Low Vison introduction from Aligarh Muslim UniversityLow Vison introduction from Aligarh Muslim University
Low Vison introduction from Aligarh Muslim University
Aligarh Muslim University, Aligarh, Uttar Pradesh, India
 
Policies, procedures, subject selection and QTAC.pptx
Policies, procedures, subject selection and QTAC.pptxPolicies, procedures, subject selection and QTAC.pptx
Policies, procedures, subject selection and QTAC.pptx
mansk2
 
Protest - Student Revision Booklet For VCE English
Protest - Student Revision Booklet For VCE EnglishProtest - Student Revision Booklet For VCE English
Protest - Student Revision Booklet For VCE English
jpinnuck
 
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
Arshad Shaikh
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-25-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-25-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-25-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-25-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
siemaillard
 
How to Add a Custom Menu, List view and FIlters in the Customer Portal Odoo 18
How to Add a Custom Menu, List view and FIlters in the Customer Portal Odoo 18How to Add a Custom Menu, List view and FIlters in the Customer Portal Odoo 18
How to Add a Custom Menu, List view and FIlters in the Customer Portal Odoo 18
Celine George
 
Unit 1 Tools Beneficial for Monitoring the Debugging Process.pdf
Unit 1 Tools Beneficial for Monitoring the Debugging Process.pdfUnit 1 Tools Beneficial for Monitoring the Debugging Process.pdf
Unit 1 Tools Beneficial for Monitoring the Debugging Process.pdf
ChatanBawankar
 
SAMARTH QUIZ 2024-25_ PRELIMINARY ROUNDS
SAMARTH QUIZ 2024-25_ PRELIMINARY ROUNDSSAMARTH QUIZ 2024-25_ PRELIMINARY ROUNDS
SAMARTH QUIZ 2024-25_ PRELIMINARY ROUNDS
Anand Kumar
 
Flower Identification Class-10 by Kushal Lamichhane.pdf
Flower Identification Class-10 by Kushal Lamichhane.pdfFlower Identification Class-10 by Kushal Lamichhane.pdf
Flower Identification Class-10 by Kushal Lamichhane.pdf
kushallamichhame
 
Regression Analysis-Machine Learning -Different Types
Regression Analysis-Machine Learning -Different TypesRegression Analysis-Machine Learning -Different Types
Regression Analysis-Machine Learning -Different Types
Global Academy of Technology
 
0b - THE ROMANTIC ERA: FEELINGS AND IDENTITY.pptx
0b - THE ROMANTIC ERA: FEELINGS AND IDENTITY.pptx0b - THE ROMANTIC ERA: FEELINGS AND IDENTITY.pptx
0b - THE ROMANTIC ERA: FEELINGS AND IDENTITY.pptx
Julián Jesús Pérez Fernández
 
TechSoup - Microsoft Discontinuation of Selected Cloud Donated Offers 2025.05...
TechSoup - Microsoft Discontinuation of Selected Cloud Donated Offers 2025.05...TechSoup - Microsoft Discontinuation of Selected Cloud Donated Offers 2025.05...
TechSoup - Microsoft Discontinuation of Selected Cloud Donated Offers 2025.05...
TechSoup
 
Odoo 18 Point of Sale PWA - Odoo Slides
Odoo 18 Point of Sale PWA  - Odoo  SlidesOdoo 18 Point of Sale PWA  - Odoo  Slides
Odoo 18 Point of Sale PWA - Odoo Slides
Celine George
 
Education Funding Equity in North Carolina: Looking Beyond Income
Education Funding Equity in North Carolina: Looking Beyond IncomeEducation Funding Equity in North Carolina: Looking Beyond Income
Education Funding Equity in North Carolina: Looking Beyond Income
EducationNC
 
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANASTUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
Kweku Zurek
 
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
Jenny408767
 
How to Configure Credit Card in Odoo 18 Accounting
How to Configure Credit Card in Odoo 18 AccountingHow to Configure Credit Card in Odoo 18 Accounting
How to Configure Credit Card in Odoo 18 Accounting
Celine George
 
Order Lepidoptera: Butterflies and Moths.pptx
Order Lepidoptera: Butterflies and Moths.pptxOrder Lepidoptera: Butterflies and Moths.pptx
Order Lepidoptera: Butterflies and Moths.pptx
Arshad Shaikh
 
Unit Kali NetHunter is the official Kali Linux penetration testing platform f...
Unit Kali NetHunter is the official Kali Linux penetration testing platform f...Unit Kali NetHunter is the official Kali Linux penetration testing platform f...
Unit Kali NetHunter is the official Kali Linux penetration testing platform f...
ChatanBawankar
 
Policies, procedures, subject selection and QTAC.pptx
Policies, procedures, subject selection and QTAC.pptxPolicies, procedures, subject selection and QTAC.pptx
Policies, procedures, subject selection and QTAC.pptx
mansk2
 
Protest - Student Revision Booklet For VCE English
Protest - Student Revision Booklet For VCE EnglishProtest - Student Revision Booklet For VCE English
Protest - Student Revision Booklet For VCE English
jpinnuck
 
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
Arshad Shaikh
 
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
siemaillard
 
How to Add a Custom Menu, List view and FIlters in the Customer Portal Odoo 18
How to Add a Custom Menu, List view and FIlters in the Customer Portal Odoo 18How to Add a Custom Menu, List view and FIlters in the Customer Portal Odoo 18
How to Add a Custom Menu, List view and FIlters in the Customer Portal Odoo 18
Celine George
 
Unit 1 Tools Beneficial for Monitoring the Debugging Process.pdf
Unit 1 Tools Beneficial for Monitoring the Debugging Process.pdfUnit 1 Tools Beneficial for Monitoring the Debugging Process.pdf
Unit 1 Tools Beneficial for Monitoring the Debugging Process.pdf
ChatanBawankar
 
SAMARTH QUIZ 2024-25_ PRELIMINARY ROUNDS
SAMARTH QUIZ 2024-25_ PRELIMINARY ROUNDSSAMARTH QUIZ 2024-25_ PRELIMINARY ROUNDS
SAMARTH QUIZ 2024-25_ PRELIMINARY ROUNDS
Anand Kumar
 
Flower Identification Class-10 by Kushal Lamichhane.pdf
Flower Identification Class-10 by Kushal Lamichhane.pdfFlower Identification Class-10 by Kushal Lamichhane.pdf
Flower Identification Class-10 by Kushal Lamichhane.pdf
kushallamichhame
 
Regression Analysis-Machine Learning -Different Types
Regression Analysis-Machine Learning -Different TypesRegression Analysis-Machine Learning -Different Types
Regression Analysis-Machine Learning -Different Types
Global Academy of Technology
 
TechSoup - Microsoft Discontinuation of Selected Cloud Donated Offers 2025.05...
TechSoup - Microsoft Discontinuation of Selected Cloud Donated Offers 2025.05...TechSoup - Microsoft Discontinuation of Selected Cloud Donated Offers 2025.05...
TechSoup - Microsoft Discontinuation of Selected Cloud Donated Offers 2025.05...
TechSoup
 
Odoo 18 Point of Sale PWA - Odoo Slides
Odoo 18 Point of Sale PWA  - Odoo  SlidesOdoo 18 Point of Sale PWA  - Odoo  Slides
Odoo 18 Point of Sale PWA - Odoo Slides
Celine George
 
Education Funding Equity in North Carolina: Looking Beyond Income
Education Funding Equity in North Carolina: Looking Beyond IncomeEducation Funding Equity in North Carolina: Looking Beyond Income
Education Funding Equity in North Carolina: Looking Beyond Income
EducationNC
 
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANASTUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
Kweku Zurek
 
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
Jenny408767
 
How to Configure Credit Card in Odoo 18 Accounting
How to Configure Credit Card in Odoo 18 AccountingHow to Configure Credit Card in Odoo 18 Accounting
How to Configure Credit Card in Odoo 18 Accounting
Celine George
 
Order Lepidoptera: Butterflies and Moths.pptx
Order Lepidoptera: Butterflies and Moths.pptxOrder Lepidoptera: Butterflies and Moths.pptx
Order Lepidoptera: Butterflies and Moths.pptx
Arshad Shaikh
 

Jquery 1

  • 1. Jquery By – Hussain Fakhruddin Manish Singh
  • 2. What is Jquery? jQuery is a fast and concise JavaScript Library. Simplifies HTML document traversing, event handling, animating, and ajax interactions for rapid web development. Designed to change the way that you write JavaScript. Lightweight tool.
  • 3. Features Free and Open Source. Support for CSS3. Cross-browser support. Lots of inbuilt functions and plugins. Support for creating own plugins for users.
  • 4. JavaScript and jQuery Jquery is a library bult on top of javascript. jQuery simplifies coding for developers. jQuery is NOT faster then javascript but makes the code look much elegent. Once you have done some work with jQuery coming back to JavaScript mght look painful.
  • 5. Why Jquery Over JavaScript There are much more functions and plugins for developers. Even bigger functionalities can be achieved in less amount of coding. Provides better compatibility with different browsers. Ajax is made very easy with jquery. Easy to provide effects, animation, designs to the pages
  • 6. Downloading Jquery jQuery can be downloaded either in minified form or uncompressed form. Download jQuery in minified form in below link : http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.3.2.min.js . jQuery resources can be found at http://docs.jquery.com .
  • 7. Getting Started Put the downloaded jquery.js file after unzipping ( if needed) inside your application directory. Insert the following <script> tag in the <head> section of your HTMl file: <script type=&quot;text/javascript&quot; src=&quot;jquery.js&quot;></script> Now write the HTML code given in next slide and run it through any browser
  • 8. Hello World Code using jQuery <html> <head> <script type=&quot;text/javascript&quot; src=&quot;jquery.js&quot;></script> <script type=&quot;text/javascript&quot;> $(document).ready(function() { $(&quot;a&quot;).click(function() { alert(&quot;Hello World!&quot;); }); }); </script> </head> <body> <a href=&quot;&quot;>Link</a> </body> </html>
  • 9. Explanation of Code $(document).ready = window.onload of plain javascript. $(&quot;a&quot;) stands for <a> element of html. In the web page the word “Link” is displayed with a link. On clicking that link the jquery function will get called and an alert message is displayed.
  • 10. $ Sign in jQuery or JavaScript A beginner, or even a seasoned JavaScript programmer may be slightly intimidated once spotting something as ambiguous as the  dollar sign  ($). Well,there is nothing mysterious about the $ sign, for it is just a variable (or an identifier) name and legal in Javascript. In JavaScript, the dollar sign commonly appears in variable definitions and function calls.
  • 11. Making jQuery Simpler Jquery is all about making things simple for developers. So we can replace the $(document).ready part like below in the Hello World Example : $(function() { $(&quot;a&quot;).click(function() { alert(&quot;Hello world!&quot;); }); });
  • 12. Types in jQuery JavaScript provides several built-in types.All of them are supported in jquery In addition to those, there are virtual types like Selectors, enhanced pseudo-types like Events and Functions. By default any variable is initialized with false.
  • 13. String Type A string in JavaScript is an immutable object that contains none, one or many characters. Immutable means, once created they cannot be changed. Ex : - “ I am a string.” - typeof “Any String”; //o/p string
  • 14. String Quoting A string can be defined using single or double quotes. You can nest single quotes inside of double quotes, and vice versa. To mix double quotes with double quotes, the nested ones have to be escaped with a backslash. Ex : &quot;You make 'me' sad.“ 'Holy &quot;cranking&quot; moses!‘ &quot;<a href=\&quot;home\&quot;>Home</a>&quot;
  • 15. String Functions A string in JavaScript has some built-in methods to manipulate the string . The result might be new string - or something else, eg. split returns an array. Ex : &quot;hello&quot;.charAt(0) // &quot;h&quot; &quot;hello&quot;.toUpperCase() // &quot;HELLO&quot; &quot;Hello&quot;.toLowerCase() // &quot;hello“ &quot;hello&quot;.replace(/e|o/g, &quot;x&quot;) // &quot;hxllx&quot; &quot;1,2,3&quot;.split(&quot;,&quot;) // [&quot;1&quot;, &quot;2&quot;, &quot;3&quot;]
  • 16. String Properties All strings have a length property. Ex : &quot;Hello&quot;.length // 5 An empty string defaults to false: Ex : !&quot;&quot; // true   !&quot;hello&quot; // false !&quot;true&quot; // false   !new Boolean(false) // false
  • 17. Numbers Numbers are double-precision 64-bit format IEEE 754 values. They are immutable, just as strings. All operators common in c-based languages are available to work with numbers (+, -, *, /, %, =, +=, -=, *=, /=, ++, --). Ex : typeof 12 // &quot;number&quot;
  • 18. More on Numbers JavaScript provides utilities to work with numbers in the Math object. Ex : Math.PI // 3.141592653589793 Math.cos(Math.PI) // -1 If a number is zero, it defaults to false. Ex :  !0 // true   !1 // false
  • 19. Continued… Parsing Numbers : parseInt and parseFloat help parsing strings into numbers. Both do some implicit conversion if the base isn't specified. Ex : parseInt(&quot;123&quot;) = 123 (implicit decimal) parseInt(&quot;010&quot;) = 8 (implicit octal) parseInt(&quot;0xCAFE&quot;) = 51966(implicit hex) parseInt(&quot;010&quot;, 10) = 10 (explicit decimal) parseInt(&quot;11&quot;, 2) = 3 (explicit binary)
  • 20. Continued… Numbers to Strings : When appending numbers to string, the result is always a string.  If you want to add numbers and then append them to a string, put parentheses around them. Ex : &quot;&quot; + 1 + 2; // &quot;12“ &quot;&quot; + (1 + 2); // &quot;3&quot;
  • 21. NaN and Infinity Parsing something that isn't a number results in NaN. Division by zero results in Infinity. Both NaN and Infinity are of type &quot;number“. Ex : parseInt(&quot;hello&quot;, 10) // NaN isNaN(parseInt(&quot;hello&quot;, 10)) // true 1 / 0 // Infinity NaN == NaN // false Infinity == Infinity // true
  • 22. Objects Javascript supports Object Orientation. Object can be crated in following way : var x = { }; var y = { name: “Manish&quot;, age: 24 }; You can write and read properties of an object using the dot notation. Ex : x.name = y.name + &quot; Singh&quot; // “Manish Singh&quot;
  • 23. Arrays Collection of data into a single variable. Ex : x = [1,2,3]; The type of an array is &quot;object&quot; . You write and read object properties using the array notation also. It allows you to dynamically choose the property.
  • 24. Continued An array, no matter if it has elements or not, never defaults to false . Ex : var operations = { increase: &quot;++&quot;, decrease: &quot;--&quot; } var operation = &quot;increase&quot;; operations[operation] // &quot;++&quot;; operations[&quot;multiply&quot;] = &quot;*&quot;; // &quot;*&quot;
  • 25. Iteration Apart from normal javascript loops jquery support many advanced iterations. jQuery provides a generic each-function to iterate over properties of objects, as well as elements of arrays Ex : jQuery.each(obj, function(key, value) { console.log(&quot;key&quot;, key, &quot;value&quot;, value); });
  • 26. Function A function in JavaScript can be either named or anonymous. An anonymous function can be assigned to a variable or passed to a method. The type of a function is &quot;function&quot;. Ex : function named() { } var handler = function() { }
  • 27. More on Functions Inside a function a special variable &quot;arguments&quot; is always available. It's similar to an array in that it has a length property, but it lacks the built-in methods of an array. The arguments object also has a callee property, which refers to the function you're inside of.
  • 28. Examples function log(x) { console.log(typeof x,arguments.length); } log(); // &quot;undefined&quot;, 0 log(1); // &quot;number&quot;, 1 log(&quot;1&quot;, &quot;2&quot;, &quot;3&quot;); // &quot;string&quot;, 3 var awesome = function() { return arguments.callee } awesome() == awesome // true
  • 29. Scope and Closures In JavaScript, all variables defined inside a function are only visible inside that function scope.  Closures are created whenever a variable that is defined outside the current scope is accessed from within some inner scope.
  • 30. Example // global var x = 0; (function() { // private var x = 1; console.log(x); // 1 })(); console.log(x); // 0
  • 31. function create(){ var counter = 0; return { increment: function() { counter++; }, print: function() { console.log(counter); } } } var c = create(); c.increment(); c.print(); // 1
  • 32. Callback A callback is a plain JavaScript function passed to some method as an argument or option. Some callbacks are just events, called to give the user a chance to react when a certain state is triggered.  jQuery's event system uses such callbacks everywhere.
  • 33. Example of callback $(&quot;body&quot;).click(function(event) { console.log(&quot;clicked: &quot; + event.target); }); $(&quot;#myform&quot;).submit(function() { return false; });
  • 34. References http://www.tutsdeck.com/tutorial/2/jquery-tutorial-beginners/ http://my123web.blogspot.com/search/label/jQuery http://jquery-howto.blogspot.com/2009/06/jquery-beginner-tutorials.html http://docs.jquery.com http://www.authenticsociety.com/blog/JavaScript_DollarSign