SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 
J query1.2.cheatsheet.v1.0
J query1.2.cheatsheet.v1.0J query1.2.cheatsheet.v1.0
J query1.2.cheatsheet.v1.0Mariaa Maria
 

Ähnlich wie 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
 
J query1.2.cheatsheet.v1.0
J query1.2.cheatsheet.v1.0J query1.2.cheatsheet.v1.0
J query1.2.cheatsheet.v1.0
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 
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 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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 CVKhem
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Kürzlich hochgeladen (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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?
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
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
 

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.

Hinweis der Redaktion

  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…