SlideShare a Scribd company logo
1 of 42
Presentation On JQuery

                 Prepared
                    By
                 Rahul Jain
              Lexcis Solution
Agenda
• Basics of Jquery
• Javascript vs Jquery
• Why to use Jquery
• Concept of Jquery
• Overview of jquery API
• Jquery pros and cons
• Jquery programs
• Conclusion
What exactly is jQuery
jQuery is a JavaScript Library!


• Dealing with the DOM
• JavaScript Events
• Animations
• Ajax interactions
jQuery Basics
                     jQuery()
This function is the heart of the jQuery library
You use this function to fetch elements using CSS
selectors
and wrap them in jQuery objects so we can
manipulate
them

There’s a shorter version of the jQuery() function: $()
$("h1");
$(".important");
Document Ready

$(document).ready(function(){
// Your code here
});
jQuery has a simple statement that
checks the
document and waits until it's ready
to be manipulated
What’s the problem with
      JavaScript?
JavaScript is a weakly typed,
classless, prototype based OO
language, that can also be used
outside the browser. It is not a
        browser DOM.
It means no more of this
var tables = document.getElementsByTagName("table");
for (vart = 0; t<tables.length; t++) {
var rows = tables[t].getElementsByTagName("tr");
    for (vari = 1; i<rows.length; i += 2) {
        if (!/(^|s)odd(s|$)/.test(rows[i].className)) {
                  rows[i].className += " odd";
        }
    }
};
Using jQuery we can do this

  $("tabletr:nth-child(odd)").addClass("odd");
Using jQuery we can do this

  jQuery("tabletr:nth-child(odd)").addClass("odd");




jQuery function
Using jQuery we can do this

  jQuery("tabletr:nth-child(odd)").addClass("odd");


                  jQuery Selector (CSS expression)

jQuery function
Using jQuery we can do this

  jQuery("tabletr:nth-child(odd)").addClass("odd");



                  jQuery Selector (CSS expression)

jQuery function



      jQuery Wrapper Set
Using jQuery we can do this

  jQuery("tabletr:nth-child(odd)").addClass("odd");



                  jQuery Selector (CSS expression)

jQuery function



      jQuery Wrapper Set                jQuery Method
It really is the

“write less, do more”

 JavaScript Library!
Why use jQuery
• Helps us to simplify and speed up web
development
• Allows us to avoid common headaches
associated with browser development
• Provides a large pool of plugins
• Large and active community
• Tested on 50 browsers, 11 platforms
• Its for both coders and designers
Three Major Concepts of jQuery




 The $() function




                            Get > Act




             Chainability
The Magic $() function



      var el = $(“<div/>”)



Create HTML elements on the fly
The Magic $() function



        $(window).width()



Manipulate existing DOM elements
The Magic $() function



    $(“div”).hide();
$(“div”, $(“p”)).hide();

 Selects document elements
   (more in a moment…)
The Magic $() function

           $(function(){…});

Fired when the document is ready for
            programming.

      Better use the full syntax:

   $(document).ready(function(){…});
jQuery’s programming philosophy
               is:
          GET >> ACT

 $(“div”).hide()
 $(“<span/>”).appendTo(“body”)
 $(“:button”).click()
Almost every function returns
jQuery, which provides a fluent
  programming interface and
         chainability:


$(“div”).show()
        .addClass(“main”)
        .html(“Hello jQuery”);
Overview of jQuery API
     Core
     Selectors
     Attributes
     Traversing
     Manipulation
     CSS
     Events
     Effects
     Ajax
     Utilities
Overview of jQuery API
   Core
   Selectors
                   jQuery()
   Attributes     each()
   Traversing     map()
                   size()

   Manipulation   length
                   selector

    CSS
                   context
                  index()
                   get()
   Events
   Effects
   Ajax
   Utilities
Overview of jQuery API
   Core
   Selectors      jQuery("#nav li.contact")


   Attributes     jQuery(":visible")


    Traversing
                   jQuery(":radio:enabled:checked")

                   jQuery("a[title]")
   Manipulation
                   jQuery("a[title][href='foo']")
   CSS            jQuery("a:first[href*='foo']")
   Events         jQuery("#header, #footer")
   Effects        jQuery("#header, #footer").filter(":visible")

   Ajax
   Utilities
Overview of jQuery API
   Core
   Selectors      attr()
                   removeAttr()
   Attributes     addClass()
   Traversing     hasClass()
                   toggleClass()
   Manipulation   removeClass()

   CSS            val()

   Events
   Effects
   Ajax
   Utilities
Overview of jQuery API
   Core
   Selectors      add()
                   children()
                                eq()
                                filter()
   Attributes     closest()
                   find()
                                is()
                                not()
   Traversing     next()
                   nextAll()
                                slice()

   Manipulation   prev()
                   prevAll()
   CSS            siblings()

   Events         parent()
                   parents()
   Effects
                   andSelf()
   Ajax           end()

   Utilities
Overview of jQuery API
   Core
   Selectors      html()
                   text()
                                    replaceWith()
                                    replaceAll()
   Attributes     append()         empty()
   Traversing     appendTo()       remove()
                   prepend()
   Manipulation   prependTo()      clone()

   CSS            after()
                   insertAfter()
   Events         before()
                   insertBefore()
   Effects
    Ajax
                   wrap()
                  wrapAll()
   Utilities      wrapInner()
Overview of jQuery API
   Core
   Selectors      css()


   Attributes     offset()
                   offsetParent()
   Traversing     postion()
                   scrollTop()
   Manipulation   scrollLeft()

   CSS            height()
                   width()
   Events         innerHeight()
                   innerWidth()
   Effects        outerHeight()
                   outerWidth()
   Ajax
   Utilities
Overview of jQuery API
   Core
   Selectors      ready()            blur()
                                      change()

   Attributes     bind()
                   one()
                                      click()
                                      dbclick()

    Traversing
                   trigger()          error()
                  triggerHandler()   focus()
                   unbind()           keydown()
   Manipulation                      keypress()
                   live()             keyup()
   CSS            die()              mousedown()
                                      mousenter()
   Events         hover()
                   toggle()
                                      mouseleave()
                                      mouseout()
   Effects                           mouseup()
                                      resize()

   Ajax                              scroll()
                                      select()
                                      submit()
   Utilities                         unload()
Overview of jQuery API
   Core
   Selectors      show()
                   hide()
   Attributes     toggle()


   Traversing     slideDown()
                   slideUp()
   Manipulation   slideToggle()

   CSS            fadeIn()
                   fadeOut()
   Events         fadeTo()

   Effects        animate()
                   stop()
   Ajax
   Utilities
Overview of jQuery API
   Core
    Selectors      jQuery.ajax()        jQuery.ajaxSetup()
                  jQuery.get()         serialize()
   Attributes     jQuery.getJSON()
                   jQuery,getScript()
                                        serializeArray()


   Traversing     jQuery.post()

   Manipulation   load()

   CSS            ajaxComplete()
                   ajaxError()
   Events         ajaxSend()
                   ajaxStart()
   Effects        ajaxStop()
                   ajaxSuccess()
   Ajax
   Utilities
Overview of jQuery API
   Core
   Selectors      jQuery.support
                   jQuery.boxModel
                                         jQuery.trim()


   Attributes     jQuery.each(),
                                         jQuery.param()


   Traversing     jQuery.extend(),
                   jQuery.grep(),
   Manipulation   jQuery.makeArray(),
                   jQuery.map(),
   CSS            jQuery.inArray(),
                   jQuery.merge(),
   Events         jQuery.unique()

   Effects        jQuery.isArray(),
                   jQuery,isFunction()
   Ajax
   Utilities
A Few Examples
   Forms
   Chatboxes
   Menus
   Dropdowns
   Sliders
   Tabs
   Slideshows
   Games
jQuery Enhanced Forms
Menus and Dropdowns
Sliders and Slideshows
Technical Implementation


Building Real-Time Form Validation
Using jQuery
Pros:

• Large Community
• Ease of use
• Large library
• Strong opensource community. (Several
     jQuery plugins available)
• Great documentation and tutorials
• Ajax support
Cons:
• Regular updates that change existing behaviour
• Overhead of adding extra javascript to page
• Learning curve may not be short for some developers


Conclusions:
• Conclusion In the end, jquery is popular for a reason. It will
make your website easier to control and to access through any
browser.
• By using this library, you can create or include complex plug-
ins in a matter of minutes. This will make your website easier to
use and as long as you have imagination, the possibilities are
endless.
Thank You

More Related Content

What's hot

Client-side MVC with Backbone.js (reloaded)
Client-side MVC with Backbone.js (reloaded)Client-side MVC with Backbone.js (reloaded)
Client-side MVC with Backbone.js (reloaded)iloveigloo
 
MVVM with SwiftUI and Combine
MVVM with SwiftUI and CombineMVVM with SwiftUI and Combine
MVVM with SwiftUI and CombineTai Lun Tseng
 
The Dom Scripting Toolkit J Query
The Dom Scripting Toolkit J QueryThe Dom Scripting Toolkit J Query
The Dom Scripting Toolkit J QueryQConLondon2008
 
jQuery - Introdução
jQuery - IntroduçãojQuery - Introdução
jQuery - IntroduçãoGustavo Dutra
 
Fabric.js @ Falsy Values
Fabric.js @ Falsy ValuesFabric.js @ Falsy Values
Fabric.js @ Falsy ValuesJuriy Zaytsev
 
Getting Started with Combine And SwiftUI
Getting Started with Combine And SwiftUIGetting Started with Combine And SwiftUI
Getting Started with Combine And SwiftUIScott Gardner
 
Scala ActiveRecord
Scala ActiveRecordScala ActiveRecord
Scala ActiveRecordscalaconfjp
 
citigroup January 13, 2006 - Reformatted Quarterly Financial Data Supplement...
citigroup  January 13, 2006 - Reformatted Quarterly Financial Data Supplement...citigroup  January 13, 2006 - Reformatted Quarterly Financial Data Supplement...
citigroup January 13, 2006 - Reformatted Quarterly Financial Data Supplement...QuarterlyEarningsReports
 
SwiftUI and Combine All the Things
SwiftUI and Combine All the ThingsSwiftUI and Combine All the Things
SwiftUI and Combine All the ThingsScott Gardner
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Treeadamlogic
 
Knockoutjs UG meeting presentation
Knockoutjs UG meeting presentationKnockoutjs UG meeting presentation
Knockoutjs UG meeting presentationValdis Iljuconoks
 
Desenvolvimento web com Ruby on Rails (extras)
Desenvolvimento web com Ruby on Rails (extras)Desenvolvimento web com Ruby on Rails (extras)
Desenvolvimento web com Ruby on Rails (extras)Joao Lucas Santana
 
Cassandra intro
Cassandra introCassandra intro
Cassandra introAstrails
 

What's hot (20)

Client-side MVC with Backbone.js (reloaded)
Client-side MVC with Backbone.js (reloaded)Client-side MVC with Backbone.js (reloaded)
Client-side MVC with Backbone.js (reloaded)
 
MVVM with SwiftUI and Combine
MVVM with SwiftUI and CombineMVVM with SwiftUI and Combine
MVVM with SwiftUI and Combine
 
Prototype UI Intro
Prototype UI IntroPrototype UI Intro
Prototype UI Intro
 
The Dom Scripting Toolkit J Query
The Dom Scripting Toolkit J QueryThe Dom Scripting Toolkit J Query
The Dom Scripting Toolkit J Query
 
jQuery - Introdução
jQuery - IntroduçãojQuery - Introdução
jQuery - Introdução
 
Prototype Framework
Prototype FrameworkPrototype Framework
Prototype Framework
 
Fabric.js @ Falsy Values
Fabric.js @ Falsy ValuesFabric.js @ Falsy Values
Fabric.js @ Falsy Values
 
Basics of j query
Basics of j queryBasics of j query
Basics of j query
 
Jquery
JqueryJquery
Jquery
 
Getting Started with Combine And SwiftUI
Getting Started with Combine And SwiftUIGetting Started with Combine And SwiftUI
Getting Started with Combine And SwiftUI
 
Scala ActiveRecord
Scala ActiveRecordScala ActiveRecord
Scala ActiveRecord
 
citigroup January 13, 2006 - Reformatted Quarterly Financial Data Supplement...
citigroup  January 13, 2006 - Reformatted Quarterly Financial Data Supplement...citigroup  January 13, 2006 - Reformatted Quarterly Financial Data Supplement...
citigroup January 13, 2006 - Reformatted Quarterly Financial Data Supplement...
 
SwiftUI and Combine All the Things
SwiftUI and Combine All the ThingsSwiftUI and Combine All the Things
SwiftUI and Combine All the Things
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Tree
 
Knockoutjs UG meeting presentation
Knockoutjs UG meeting presentationKnockoutjs UG meeting presentation
Knockoutjs UG meeting presentation
 
Jquery
JqueryJquery
Jquery
 
Backbone Basics with Examples
Backbone Basics with ExamplesBackbone Basics with Examples
Backbone Basics with Examples
 
Soap tips
Soap tipsSoap tips
Soap tips
 
Desenvolvimento web com Ruby on Rails (extras)
Desenvolvimento web com Ruby on Rails (extras)Desenvolvimento web com Ruby on Rails (extras)
Desenvolvimento web com Ruby on Rails (extras)
 
Cassandra intro
Cassandra introCassandra intro
Cassandra intro
 

Viewers also liked

JQuery Presentation
JQuery PresentationJQuery Presentation
JQuery PresentationSony Jain
 
Introduction to j query
Introduction to j queryIntroduction to j query
Introduction to j querythewarlog
 
jQuery presentation
jQuery presentationjQuery presentation
jQuery presentationMahesh Reddy
 

Viewers also liked (8)

JQuery Presentation
JQuery PresentationJQuery Presentation
JQuery Presentation
 
Introduction to j query
Introduction to j queryIntroduction to j query
Introduction to j query
 
jQuery Effects
jQuery EffectsjQuery Effects
jQuery Effects
 
Jquery presentation
Jquery presentationJquery presentation
Jquery presentation
 
Introducing jQuery
Introducing jQueryIntroducing jQuery
Introducing jQuery
 
jQuery Beginner
jQuery BeginnerjQuery Beginner
jQuery Beginner
 
jQuery presentation
jQuery presentationjQuery presentation
jQuery presentation
 
jQuery Best Practice
jQuery Best Practice jQuery Best Practice
jQuery Best Practice
 

Similar to JQuery

Jquery web dev workshop technocracy
Jquery web dev workshop technocracyJquery web dev workshop technocracy
Jquery web dev workshop technocracyAmit Gupta
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQueryachinth
 
Jquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript BasicsJquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript BasicsEPAM Systems
 
Unobtrusive javascript with jQuery
Unobtrusive javascript with jQueryUnobtrusive javascript with jQuery
Unobtrusive javascript with jQueryAngel Ruiz
 
Kick start with j query
Kick start with j queryKick start with j query
Kick start with j queryMd. Ziaul Haq
 
jQuery Foot-Gun Features
jQuery Foot-Gun FeaturesjQuery Foot-Gun Features
jQuery Foot-Gun Featuresdmethvin
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginnersDivakar Gu
 
J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Libraryrsnarayanan
 
Introduction to jQuery - Barcamp London 9
Introduction to jQuery - Barcamp London 9Introduction to jQuery - Barcamp London 9
Introduction to jQuery - Barcamp London 9Jack Franklin
 
Using jQuery to Extend CSS
Using jQuery to Extend CSSUsing jQuery to Extend CSS
Using jQuery to Extend CSSChris Coyier
 
Ajax tutorial
Ajax tutorialAjax tutorial
Ajax tutorialKat Roque
 
J query1.2.cheatsheet.v1.0
J query1.2.cheatsheet.v1.0J query1.2.cheatsheet.v1.0
J query1.2.cheatsheet.v1.0Michael Grigsby
 

Similar to JQuery (20)

JQuery Overview
JQuery OverviewJQuery Overview
JQuery Overview
 
jQuery
jQueryjQuery
jQuery
 
jQuery Presentasion
jQuery PresentasionjQuery Presentasion
jQuery Presentasion
 
JQuery introduction
JQuery introductionJQuery introduction
JQuery introduction
 
J query training
J query trainingJ query training
J query training
 
Jquery web dev workshop technocracy
Jquery web dev workshop technocracyJquery web dev workshop technocracy
Jquery web dev workshop technocracy
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
jQuery
jQueryjQuery
jQuery
 
Jquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript BasicsJquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript Basics
 
Unobtrusive javascript with jQuery
Unobtrusive javascript with jQueryUnobtrusive javascript with jQuery
Unobtrusive javascript with jQuery
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
Kick start with j query
Kick start with j queryKick start with j query
Kick start with j query
 
jQuery Foot-Gun Features
jQuery Foot-Gun FeaturesjQuery Foot-Gun Features
jQuery Foot-Gun Features
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Library
 
Introduction to jQuery - Barcamp London 9
Introduction to jQuery - Barcamp London 9Introduction to jQuery - Barcamp London 9
Introduction to jQuery - Barcamp London 9
 
Using jQuery to Extend CSS
Using jQuery to Extend CSSUsing jQuery to Extend CSS
Using jQuery to Extend CSS
 
Ajax tutorial
Ajax tutorialAjax tutorial
Ajax tutorial
 
J query1.2.cheatsheet.v1.0
J query1.2.cheatsheet.v1.0J query1.2.cheatsheet.v1.0
J query1.2.cheatsheet.v1.0
 
JQUERY TUTORIAL
JQUERY TUTORIALJQUERY TUTORIAL
JQUERY TUTORIAL
 

Recently uploaded

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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
 
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
 
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
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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
 
"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
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
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
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation 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
 

Recently uploaded (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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?
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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...
 
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
 
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
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
"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 ...
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation 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
 

JQuery

  • 1. Presentation On JQuery Prepared By Rahul Jain Lexcis Solution
  • 2. Agenda • Basics of Jquery • Javascript vs Jquery • Why to use Jquery • Concept of Jquery • Overview of jquery API • Jquery pros and cons • Jquery programs • Conclusion
  • 3. What exactly is jQuery jQuery is a JavaScript Library! • Dealing with the DOM • JavaScript Events • Animations • Ajax interactions
  • 4. jQuery Basics jQuery() This function is the heart of the jQuery library You use this function to fetch elements using CSS selectors and wrap them in jQuery objects so we can manipulate them There’s a shorter version of the jQuery() function: $() $("h1"); $(".important");
  • 5. Document Ready $(document).ready(function(){ // Your code here }); jQuery has a simple statement that checks the document and waits until it's ready to be manipulated
  • 6. What’s the problem with JavaScript?
  • 7. JavaScript is a weakly typed, classless, prototype based OO language, that can also be used outside the browser. It is not a browser DOM.
  • 8. It means no more of this var tables = document.getElementsByTagName("table"); for (vart = 0; t<tables.length; t++) { var rows = tables[t].getElementsByTagName("tr"); for (vari = 1; i<rows.length; i += 2) { if (!/(^|s)odd(s|$)/.test(rows[i].className)) { rows[i].className += " odd"; } } };
  • 9. Using jQuery we can do this $("tabletr:nth-child(odd)").addClass("odd");
  • 10. Using jQuery we can do this jQuery("tabletr:nth-child(odd)").addClass("odd"); jQuery function
  • 11. Using jQuery we can do this jQuery("tabletr:nth-child(odd)").addClass("odd"); jQuery Selector (CSS expression) jQuery function
  • 12. Using jQuery we can do this jQuery("tabletr:nth-child(odd)").addClass("odd"); jQuery Selector (CSS expression) jQuery function jQuery Wrapper Set
  • 13. Using jQuery we can do this jQuery("tabletr:nth-child(odd)").addClass("odd"); jQuery Selector (CSS expression) jQuery function jQuery Wrapper Set jQuery Method
  • 14. It really is the “write less, do more” JavaScript Library!
  • 15. Why use jQuery • Helps us to simplify and speed up web development • Allows us to avoid common headaches associated with browser development • Provides a large pool of plugins • Large and active community • Tested on 50 browsers, 11 platforms • Its for both coders and designers
  • 16. Three Major Concepts of jQuery The $() function Get > Act Chainability
  • 17. The Magic $() function var el = $(“<div/>”) Create HTML elements on the fly
  • 18. The Magic $() function $(window).width() Manipulate existing DOM elements
  • 19. The Magic $() function $(“div”).hide(); $(“div”, $(“p”)).hide(); Selects document elements (more in a moment…)
  • 20. The Magic $() function $(function(){…}); Fired when the document is ready for programming. Better use the full syntax: $(document).ready(function(){…});
  • 21. jQuery’s programming philosophy is: GET >> ACT $(“div”).hide() $(“<span/>”).appendTo(“body”) $(“:button”).click()
  • 22. Almost every function returns jQuery, which provides a fluent programming interface and chainability: $(“div”).show() .addClass(“main”) .html(“Hello jQuery”);
  • 23. Overview of jQuery API  Core  Selectors  Attributes  Traversing  Manipulation  CSS  Events  Effects  Ajax  Utilities
  • 24. Overview of jQuery API  Core  Selectors jQuery()  Attributes each()  Traversing map() size()  Manipulation length selector CSS context  index() get()  Events  Effects  Ajax  Utilities
  • 25. Overview of jQuery API  Core  Selectors jQuery("#nav li.contact")  Attributes jQuery(":visible") Traversing jQuery(":radio:enabled:checked")  jQuery("a[title]")  Manipulation jQuery("a[title][href='foo']")  CSS jQuery("a:first[href*='foo']")  Events jQuery("#header, #footer")  Effects jQuery("#header, #footer").filter(":visible")  Ajax  Utilities
  • 26. Overview of jQuery API  Core  Selectors attr() removeAttr()  Attributes addClass()  Traversing hasClass() toggleClass()  Manipulation removeClass()  CSS val()  Events  Effects  Ajax  Utilities
  • 27. Overview of jQuery API  Core  Selectors add() children() eq() filter()  Attributes closest() find() is() not()  Traversing next() nextAll() slice()  Manipulation prev() prevAll()  CSS siblings()  Events parent() parents()  Effects andSelf()  Ajax end()  Utilities
  • 28. Overview of jQuery API  Core  Selectors html() text() replaceWith() replaceAll()  Attributes append() empty()  Traversing appendTo() remove() prepend()  Manipulation prependTo() clone()  CSS after() insertAfter()  Events before() insertBefore()  Effects Ajax wrap()  wrapAll()  Utilities wrapInner()
  • 29. Overview of jQuery API  Core  Selectors css()  Attributes offset() offsetParent()  Traversing postion() scrollTop()  Manipulation scrollLeft()  CSS height() width()  Events innerHeight() innerWidth()  Effects outerHeight() outerWidth()  Ajax  Utilities
  • 30. Overview of jQuery API  Core  Selectors ready() blur() change()  Attributes bind() one() click() dbclick() Traversing trigger() error()  triggerHandler() focus() unbind() keydown()  Manipulation keypress() live() keyup()  CSS die() mousedown() mousenter()  Events hover() toggle() mouseleave() mouseout()  Effects mouseup() resize()  Ajax scroll() select() submit()  Utilities unload()
  • 31. Overview of jQuery API  Core  Selectors show() hide()  Attributes toggle()  Traversing slideDown() slideUp()  Manipulation slideToggle()  CSS fadeIn() fadeOut()  Events fadeTo()  Effects animate() stop()  Ajax  Utilities
  • 32. Overview of jQuery API  Core Selectors jQuery.ajax() jQuery.ajaxSetup()  jQuery.get() serialize()  Attributes jQuery.getJSON() jQuery,getScript() serializeArray()  Traversing jQuery.post()  Manipulation load()  CSS ajaxComplete() ajaxError()  Events ajaxSend() ajaxStart()  Effects ajaxStop() ajaxSuccess()  Ajax  Utilities
  • 33. Overview of jQuery API  Core  Selectors jQuery.support jQuery.boxModel jQuery.trim()  Attributes jQuery.each(), jQuery.param()  Traversing jQuery.extend(), jQuery.grep(),  Manipulation jQuery.makeArray(), jQuery.map(),  CSS jQuery.inArray(), jQuery.merge(),  Events jQuery.unique()  Effects jQuery.isArray(), jQuery,isFunction()  Ajax  Utilities
  • 34. A Few Examples  Forms  Chatboxes  Menus  Dropdowns  Sliders  Tabs  Slideshows  Games
  • 38. Technical Implementation Building Real-Time Form Validation Using jQuery
  • 39. Pros: • Large Community • Ease of use • Large library • Strong opensource community. (Several jQuery plugins available) • Great documentation and tutorials • Ajax support
  • 40. Cons: • Regular updates that change existing behaviour • Overhead of adding extra javascript to page • Learning curve may not be short for some developers Conclusions: • Conclusion In the end, jquery is popular for a reason. It will make your website easier to control and to access through any browser. • By using this library, you can create or include complex plug- ins in a matter of minutes. This will make your website easier to use and as long as you have imagination, the possibilities are endless.
  • 41.

Editor's Notes

  1. Will add a class to each odd table row inside of each table in an html pagenot too complex, already nine lines of codelead in: using jQuery…