SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Destaque

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
 

Destaque (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
 

Semelhante a 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
 

Semelhante a 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
 

Último

Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 

Último (20)

Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 

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.

Notas do Editor

  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…