SlideShare a Scribd company logo
Sreenath H B
                                 +91 988 646 5897
                                 mail@sreenath.net
© Copyright SREENATH H B, 2011
                                 http://sreenath.net
Training Agenda for HTML, CSS, JavaScript & jQuery
        Day 1
                 Session 1:
                        Web Terminologies
                        HTML Basics
                        Lab: Our First HTML Page
                 Session 2:
                        CSS Basics
                        Lab: Creating a 3 Column Layout Page
        Day 2:
                 Session 1:
                        HTML Forms
                        Working with a Server Side Technology (ASP.NET)
                        Lab: Creating a User Registration Form
                 Session 2:
                        Background Images, Pseudo Classes, Sprites
                        Lab: Styling the User Registration Form


© Copyright SREENATH H B, 2011
                                                                          2
Training Agenda Contd..
        Day 3:
                 Session 1:
                        CSS Menus, Lists and Rounded Corners
                        Lab: Adding a rounded cornered Drop Down menu to the User Registration
                        Form
                 Session 2:
                        Browser Inconsistencies and how to handle them
                        Lab: The Complete User Registration Process
                        Mobile Web Design Overview
        Day 4:
                 Session 1:
                        JavaScript Overview
                        Lab: JavaScript Programming Basics
                 Session 2:
                        DOM, HTML Forms and JavaScript
                        Lab: User Registration Form Validation


© Copyright SREENATH H B, 2011
                                                                                                 3
Training Agenda Contd..
        Day 5:
                 Session 1:
                        Events and Event Handlers
                        Error Handling and Debugging JavaScript
                        Lab: Creating a JavaScript Modal Dialog
                 Session 2:
                        AJAX Overview
                        Lab: Loading a remote file asynchronously
        Day 6
                 Session 1:
                        jQuery Overview
                        Lab: Alternate Row Styling
                 Session 2:
                        More jQuery
                        Lab: Building a CSS Style Switcher



© Copyright SREENATH H B, 2011
                                                                    4
Training Agenda Contd..
        Day 7:
                 Session 1:
                        XML, JSON and JSONP
                        AJAX in jQuery
                        Lab: Ajaxifying the user registration form
                 Session 2:
                        Authoring Plugins
                        Lab: Creating a Shadow Plugin`
                        Performance Enhancement Techniques in Web Development
                        Accessibility Guidelines and W3C Standards
                        A note about SEO, Caching and Cookies




© Copyright SREENATH H B, 2011
                                                                                5
Training Agenda for Advanced JavaScript & jQuery
        Day 1 : JavaScript Basics
                 Session 1:
                        Anatomy of a Web Page
                        JavaScript Basics
                        Types & Special Objects in JavaScript
                        Lab: Basics of JavaScript Programming
                        DOM Access & Manipulation
                 Session 2:
                        Lab: DOM Access & Manipulation
                        JavaScript Events and Event Handlers
                        JavaScript and Forms
                        Errors and Debugging Techniques in JavaScript
                        Lab: A User Registration Form




© Copyright SREENATH H B, 2011
                                                                        6
Training Agenda Contd..
        Day 2: JavaScript Advanced
                 Session 1:
                        Object Oriented JavaScript
                        Functions as First Class Objects
                        Scopes & Closures
                        Objects & JSON
                        Lab: Objects in JavaScript
                 Session 2:
                        JS Prototype Syntax
                        Coding Standards & Design patterns
                                 Unobtrusive Programming
                                 Namespacing effectively
                                 Configuration Objects
                                 Private & Public
                                 Singleton pattern
                                 Module pattern
                                 Factory Pattern
                        Lab: Events Unobtrusively, Object Members, Implementing Patterns, Adding
                        methods to existing objects
© Copyright SREENATH H B, 2011
                                                                                                   7
Training Agenda Contd..
        Day 3: JavaScript & Ajax
                 Session 1:
                        Ajax overview
                        Ajax using JavaScript
                        Content Types & Mime Types Overview
                        Lab: The Ajax Dictionary
                 Session 2:
                        Accessibility & Fallback Techniques
                        Performance & Security Considerations
                        Browser Considerations
                        Lab: Design for Accessibility




© Copyright SREENATH H B, 2011
                                                                8
Training Agenda Contd..
        Day 4: jQuery
                 Session 1:
                        jQuery Overview
                        Selectors in jQuery
                        The jQuery Context & the jQuery Object
                        Each
                        Lab: Page Load, Selectors & Basic Effects
                 Session 2:
                        Binding Events
                        Ajax using jQuery
                        Lab: Ajax enabled Accordion
                        Post Assessment




© Copyright SREENATH H B, 2011
                                                                    9
Components of the Web
        Computer Networks
        Network Addresses
        Browsers and Web Servers
        Hyper Text Transfer Protocol (HTTP)
        Hyper Text Markup Language (HTML)
        Web Applications




© Copyright SREENATH H B, 2011
                                              10
Web Applications




                                 Static Page
                                   Request




© Copyright SREENATH H B, 2011
                                               11
Web Applications




                                 Dymamic Page
                                    Request




© Copyright SREENATH H B, 2011
                                                12
The Structure of a HTML Document
   <?xml ?>
   <!DOCTYPE/>
   <HTML>
     <HEAD>
          <TITLE></TITLE>
     </HEAD>
     <BODY></BODY>
   </HTML>




© Copyright SREENATH H B, 2011
                                      13
!DOCTYPE                            <?xml version="1.0"
                                         encoding="UTF-8"?>
   <?xml version="1.0"                 <!DOCTYPE html PUBLIC "-
     encoding="UTF-8"?>                  //W3C//DTD XHTML 1.0
   <!DOCTYPE HTML PUBLIC "-              Transitional//EN"
     //W3C//DTD HTML 4.01                "http://www.w3.org/TR/xhtml1/
     Transitional//EN"                   DTD/xhtml1-transitional.dtd">
     "http://www.w3.org/TR/html4/loo
     se.dtd">
                                       <html
                                         xmlns="http://www.w3.org/199
   <html>                                9/xhtml" xml:lang="en"
     <head>                              lang="en">
           <title></title>               <head>
      </head>                                  <title></title>
     <body                               </head>
     </body>                             <body>
   </html>                               </body>
© Copyright SREENATH H B, 2011
                                       </html>
                                                                         14
The Rules of HTML / XHTML
        HTML Is Not Case Sensitive, XHTML Is
        HTML/XHTML Attribute Values May Be Case Sensitive
        HTML/XHTML Is Sensitive to a Single White Space Character
        XHTML/HTML Follows a Content Model
        Elements Should Have Close Tags Unless Empty
        Unused Elements May Minimize
        Elements Should Nest In Correct Order
        Attribute Values Should Be Quoted
        Browsers Ignore Unknown Attributes and Elements




© Copyright SREENATH H B, 2011
                                                                    15
Core Elements
        Headings
        ID, class, title
        BR, HR, P, SPAN, DIV
        Blockquote, Pre
        Lists – OL, UL




© Copyright SREENATH H B, 2011
                                 16
© Copyright SREENATH H B, 2011
CSS
        Positioning
        Display
        Pseudo Classes
        Pseudo Elements




© Copyright SREENATH H B, 2011
                                 18
© Copyright SREENATH H B, 2011
The Three Layers




© Copyright SREENATH H B, 2011
                                 20
JavaScript Data
        Data Types – Number, String, Boolean
        Date
        Arrays, Associative Arrays
        If Statement
        Loops – While, Do-While, For
        Functions
        Scope of Variables
        Objects
        Regular Expressions




© Copyright SREENATH H B, 2011
                                               21
Lab 1: JavaScript Basics
        Write a program in which you specify a date and the program outputs
        the number of days, months, years and weeks between the specified
        date and today.




© Copyright SREENATH H B, 2011
                                                                              22
DOM Access & Manipulation
        getElementById
        getElementsByTagName




© Copyright SREENATH H B, 2011
                                 23
Events
        Event Handlers
        this
        Event Listeners
        The event Object - Prevent Default
        Event Propagation – Capturing & Bubbling




© Copyright SREENATH H B, 2011
                                                   24
DOM 0 Event Handler     W3C DOM Event Listener
  onblur                 blur
  onfocus                focus
  onchange               change
  onmouseover            mouseover
  onmouseout             mouseout
  onmousemove            mousemove
  onmousedown            mousedown
  onmouseup              mouseup
  onclick                click
  ondblclick             dblclick
  onkeydown              keydown
  onkeyup                keyup
  onkeypress             keypress
  onsubmit               submit
  onload                 load
© onunload B, 2011
  Copyright SREENATH H   unload                   25
Debugging and Error Handling
        How to Debug?
        Tools at hand – Firebug!
        JavaScript Debugger now supported in IE 8 onwards.
        Error Handling with Try-Catch




© Copyright SREENATH H B, 2011
                                                             26
Object Oriented JavaScript
        Why objects?
        Creating Object Definitions
        Reusing Objects
        JSON Overview




   Advanced Concepts
        Passing Parameters to Event Handlers/Listeners
        Functions accepting arbitrary number of parameters
        JavaScript Closures




© Copyright SREENATH H B, 2011
                                                             27
AJAX




© Copyright SREENATH H B, 2011
                                 28
XMLHttpRequest
        IE 5 & 6 – new ActiveXObject(“Microsoft.XMLHTTP”);
        Open(Type, Url)
        Send(data)
        XMLHttpRequest object is non-reusable
        responseXML and responseText




© Copyright SREENATH H B, 2011
                                                             29
© Copyright SREENATH H B, 2011
jQuery Overview
        What is jQuery actually?
        How browsers see HTML
        JSON Overview
        Downloading jQuery
        Including jQuery in your pages
        Hello World




© Copyright SREENATH H B, 2011
                                         31
Selectors – The Heart of jQuery
        Element Selector
            $(“element”)
        ID Selector
            $(“#id”)
        Class Selector
            $(“.classname”)
        Ancestor Descendant
         $(“E F”)
        Parent Child
         $(“E > F”)
        Siblings – Adjacent & General
         Adjacent Sibling : $(“E + F”)
         General Siblings : $(“E ~ F”);
        Multiple Selectors
         $(“E, F, G”)

© Copyright SREENATH H B, 2011
                                          32
Selectors Contd..
        :first-child, :last:child, :only-child :nth-child(n)
         $(“li:first-child”);
         $(“tr:last-child”);
         $(“img:only-child”);
         $(“tr:nth-child(2n)”);
        Attribute Selectors
         Has Attribute: $(“img[alt]”);
         Begins With: $(“a[href^=mailto:]”);
         Ends With: $(“a[href$=.pdf]”);
         Contains: $(“a[href*=microsoft]”);
         Equals: $(“:checkbox[checked=true]”)
        :not(s), :empty, :eq(n), :contains(s)
        :even, :odd




© Copyright SREENATH H B, 2011
                                                               33
jQuery Tid-Bits
        The jQuery Object
        Looping with each();
        this
        Chaining
        Closures
        Accessing DOM Objects
                 Array Subscript – Unsafe
                 .get(n)
        Making peace with other libraries – noConflict()
        Caching for performance




© Copyright SREENATH H B, 2011
                                                           34
DOM Traversal
        .filter()
        .siblings()
        .parent(), .children(), .parents()
        .next(), .nextAll(), .prev(), .prevAll(), .andSelf()
        .find()

   Manipulating Styles
        .addClass()
        .removeClass()
        .css(“height”, “35px”)




© Copyright SREENATH H B, 2011
                                                               35
Events
        Unobtrusive Programming
        Capturing vs. Bubbling; StopPropagation, preventDefault
        The Universal Page Load
        Binding Events to Elements, Triggering Events via Code
        Shorthands
                 Blur, focus, select
                 Change
                 Click, Dblclick
                 Mousedown, mouseup, mouseover, mouseout, mousemove
                 Keyup, keydown, keypress
                 Select
        Event Handler Context
        Passing additional parameters to events
        Compound Events
                 Toggle, Hover
        Live, Die & Delegate!
© Copyright SREENATH H B, 2011
                                                                      36
Effects & Animations
        Hide, Show
        fadeIn, fadeOut
        Toggle
        slideUp, slideDown
        slideToggle
        .animate()




© Copyright SREENATH H B, 2011
                                 37
Working with Forms
        Form Selectors
                 :text
                 :checkbox
                 :radio
                 :image
                 :submit
                 :reset
                 :password
                 :file
                 :input
                 :button
                 :enabled
                 :disabled
                 :checked
                 :selected

© Copyright SREENATH H B, 2011
                                 38
DOM Manipulation
        .text()
        .html()
        .val()
        .append(), prepend()
        .remove()
        .empty()
        .attr(), .removeAttr()
        addClass(), removeClass()
        Creating DOM Nodes
        insertAfter, after, insertBefore, before
        prependTo, appendTo
        .wrap()



© Copyright SREENATH H B, 2011
                                                   39
AJAX
        .load(“a.html”)
        .getJSON(“b.json”);
        .get(“c.xml”);
        .post(“d.php”);
        .ajax({
                                 url:””,
                                  type:”GET”,
                                 dataType: “html”,
                                 success: function(data){
                                           },
                                 error: function(xhr){
                                           }
                    })



© Copyright SREENATH H B, 2011
                                                            40
Authoring Plugins
   (function($){
      $.fn.myPlugin = function(options){
            var defaults = { };
            options = $.extend(defaults, options);

                    return this.each(function(){
                             //My Code for selected elements
                    });
       }
   })(jQuery);

   //Calling
   $(“selector”).myPlugin({options})


© Copyright SREENATH H B, 2011
                                                               41
jQuery Best Practices – Tips & Tricks
        Select directly using an ID selector where possible
        Cache objects if using repeatedly
        Chain as long as possible
        Reduce Direct DOM Manipulation
        Be wary of selectors in loops or each()
        Leverage Event Delegation where possible
        Defer loading to window.load
        Don’t use jQuery where its not needed!
        Conditionally loading jQuery locally




© Copyright SREENATH H B, 2011
                                                              42
OOJ – Object Oriented JavaScript
        JavaScript is a Prototype based Language
        Closures
        JSON
        Extending Native Objects
        Getter/Setter
        Arrays & Objects – Library -> Books -> Authors




© Copyright SREENATH H B, 2011
                                                         43
Lab
        Create a class for Cartesian Co-Ordinate System of Points. A Point
        has 2 properties, Latitude and Longitude. Create 2 point objects, set
        their co-ordinates using their constructors and provide a member
        function to find the simple X & Y distance between them.
        Distance can be represented as another Point object.
        X distance = x1.Longitude – x2.Longitude
        Y distance = x1.Latitude – x1.Latitude
        User interactivity is a bonus.




© Copyright SREENATH H B, 2011
                                                                                44
JSON
   var myJSONObject = {
      “People":
      [
           {“Name": “Tom", “Age": “25", “Email": “tom@abc.com"},
           {“Name": “Dick", “Age": “24", “Email": “dick@xyz.com"},
           {“Name": “Harry", “Age": “26", “Email": “harry@pqr.com"}
       ]
   };

   var myObject = JSON.parse(myJSONtext);

   var myJSONText = JSON.stringify(myObject, replacer);



© Copyright SREENATH H B, 2011
                                                                      45
AJAX




© Copyright SREENATH H B, 2011
                                 46
XMLHttpRequest
        IE 5 & 6 – new ActiveXObject(“Microsoft.XMLHTTP”);
        Open(Type, Url)
        Send(data)
        XMLHttpRequest object is non-reusable
        responseXML and responseText




© Copyright SREENATH H B, 2011
                                                             47
Design Patterns in JavaScript
        Singleton
        Module
                 Module Syntax
                 Accesing Globals
                 Module Export
        Factory




© Copyright SREENATH H B, 2011
                                    48
References
        Dive Into Accessibility
                 http://diveintoaccessibility.org/
        Dive into HTML5
                 http://diveintohtml5.org/
        Books
                 Pro JavaScript Design Patterns by Dustin Diaz
                 Object Oriented JavaScript by Stoyan Stefanov
                 Advanced JavaScript 3rd Ed by Chuck Easttom
                 Learning jQuery 1.3




© Copyright SREENATH H B, 2011
                                                                 50

More Related Content

What's hot (20)

What is front-end development ?
What is front-end development ?What is front-end development ?
What is front-end development ?
Mahmoud Shaker
 
What is jQuery?
What is jQuery?What is jQuery?
What is jQuery?
tina3reese7
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_u
Doris Chen
 
Seminar: Become a Reliable Web Programmer
Seminar: Become a Reliable Web ProgrammerSeminar: Become a Reliable Web Programmer
Seminar: Become a Reliable Web Programmer
Achmad Solichin
 
Sai Sharan_UI_Resume
Sai Sharan_UI_ResumeSai Sharan_UI_Resume
Sai Sharan_UI_Resume
Sai Sharan Madisetty
 
Introduction to HTML5/CSS3 In Drupal 7
Introduction to HTML5/CSS3 In Drupal 7Introduction to HTML5/CSS3 In Drupal 7
Introduction to HTML5/CSS3 In Drupal 7
Mediacurrent
 
Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016
Doris Chen
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
Mike Wilcox
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!
Doris Chen
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
Evan Mullins
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
Mike Wilcox
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
zonathen
 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile apps
Ivano Malavolta
 
Web Standards
Web StandardsWeb Standards
Web Standards
ChrisF1502010
 
HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)
Mediacurrent
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the web
Ivano Malavolta
 
A Work Day Of A Web Developer
A Work Day Of A Web DeveloperA Work Day Of A Web Developer
A Work Day Of A Web Developer
Edureka!
 
Web Standards And Protocols
Web Standards And ProtocolsWeb Standards And Protocols
Web Standards And Protocols
Steven Cahill
 
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
David Wesst
 
Understand front end developer
Understand front end developerUnderstand front end developer
Understand front end developer
Hsuan Fu Lien
 
What is front-end development ?
What is front-end development ?What is front-end development ?
What is front-end development ?
Mahmoud Shaker
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_u
Doris Chen
 
Seminar: Become a Reliable Web Programmer
Seminar: Become a Reliable Web ProgrammerSeminar: Become a Reliable Web Programmer
Seminar: Become a Reliable Web Programmer
Achmad Solichin
 
Introduction to HTML5/CSS3 In Drupal 7
Introduction to HTML5/CSS3 In Drupal 7Introduction to HTML5/CSS3 In Drupal 7
Introduction to HTML5/CSS3 In Drupal 7
Mediacurrent
 
Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016
Doris Chen
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
Mike Wilcox
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!
Doris Chen
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
Evan Mullins
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
Mike Wilcox
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
zonathen
 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile apps
Ivano Malavolta
 
HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)
Mediacurrent
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the web
Ivano Malavolta
 
A Work Day Of A Web Developer
A Work Day Of A Web DeveloperA Work Day Of A Web Developer
A Work Day Of A Web Developer
Edureka!
 
Web Standards And Protocols
Web Standards And ProtocolsWeb Standards And Protocols
Web Standards And Protocols
Steven Cahill
 
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
David Wesst
 
Understand front end developer
Understand front end developerUnderstand front end developer
Understand front end developer
Hsuan Fu Lien
 

Viewers also liked (10)

Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
Knoldus Inc.
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
David Lindkvist
 
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScriptHTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
Todd Anglin
 
Introducción a HTML - CSS - JS
Introducción a HTML - CSS - JS Introducción a HTML - CSS - JS
Introducción a HTML - CSS - JS
Alejandro Miguel
 
Technical seminar report on
Technical seminar report onTechnical seminar report on
Technical seminar report on
Balveer Rathore
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
Fahim Abdullah
 
Computer science seminar topics
Computer science seminar topicsComputer science seminar topics
Computer science seminar topics
123seminarsonly
 
Html JavaScript and CSS
Html JavaScript and CSSHtml JavaScript and CSS
Html JavaScript and CSS
Radhe Krishna Rajan
 
Best topics for seminar
Best topics for seminarBest topics for seminar
Best topics for seminar
shilpi nagpal
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011
photomatt
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
Knoldus Inc.
 
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScriptHTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
Todd Anglin
 
Introducción a HTML - CSS - JS
Introducción a HTML - CSS - JS Introducción a HTML - CSS - JS
Introducción a HTML - CSS - JS
Alejandro Miguel
 
Technical seminar report on
Technical seminar report onTechnical seminar report on
Technical seminar report on
Balveer Rathore
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
Fahim Abdullah
 
Computer science seminar topics
Computer science seminar topicsComputer science seminar topics
Computer science seminar topics
123seminarsonly
 
Best topics for seminar
Best topics for seminarBest topics for seminar
Best topics for seminar
shilpi nagpal
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011
photomatt
 
Ad

Similar to HTML CSS JavaScript jQuery Training (20)

jQuery Training
jQuery TrainingjQuery Training
jQuery Training
ubshreenath
 
UI developer
UI developerUI developer
UI developer
Jeevan Kumar Reddy
 
Web 10mca556 syllabs
Web 10mca556 syllabsWeb 10mca556 syllabs
Web 10mca556 syllabs
Ramesh Bindu
 
Presenter manual RIA technology (specially for summer interns)
Presenter manual RIA technology (specially for summer interns)Presenter manual RIA technology (specially for summer interns)
Presenter manual RIA technology (specially for summer interns)
XPERT INFOTECH
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
Andres Baravalle
 
Syllibus web application
Syllibus web applicationSyllibus web application
Syllibus web application
Azizol Duralim
 
jQuery Comes to XPages
jQuery Comes to XPagesjQuery Comes to XPages
jQuery Comes to XPages
Teamstudio
 
Dot net-course-curriculumn
Dot net-course-curriculumnDot net-course-curriculumn
Dot net-course-curriculumn
Amit Sharma
 
Microsoft .Net
Microsoft .NetMicrosoft .Net
Microsoft .Net
Jeevan Kumar Reddy
 
Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)
Addy Osmani
 
What's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovationWhat's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovation
Marakana Inc.
 
Webdirections conference - @media
Webdirections conference - @mediaWebdirections conference - @media
Webdirections conference - @media
Glenn Cahill
 
TEST TEST TEST
TEST TEST TESTTEST TEST TEST
TEST TEST TEST
Glenn Cahill
 
jQuery Introduction
jQuery IntroductionjQuery Introduction
jQuery Introduction
Arwid Bancewicz
 
SIVASOFT - BEST ONLINE WEB DEVELOPMENT TRAINING COURSE
SIVASOFT - BEST ONLINE WEB DEVELOPMENT TRAINING COURSESIVASOFT - BEST ONLINE WEB DEVELOPMENT TRAINING COURSE
SIVASOFT - BEST ONLINE WEB DEVELOPMENT TRAINING COURSE
sivasoft12
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
tutorialsruby
 
JavaScript and Ajax with &lt;b>jQuery&lt;/b>
JavaScript and Ajax with &lt;b>jQuery&lt;/b>JavaScript and Ajax with &lt;b>jQuery&lt;/b>
JavaScript and Ajax with &lt;b>jQuery&lt;/b>
tutorialsruby
 
J query fundamentals
J query fundamentalsJ query fundamentals
J query fundamentals
Attaporn Ninsuwan
 
Ui development Online Training from AkiraIT Solutions
Ui development Online Training from AkiraIT SolutionsUi development Online Training from AkiraIT Solutions
Ui development Online Training from AkiraIT Solutions
AkiraIT Solutions
 
Microsoft PowerPoint - &lt;b>jQuery&lt;/b>-1-Ajax.pptx
Microsoft PowerPoint - &lt;b>jQuery&lt;/b>-1-Ajax.pptxMicrosoft PowerPoint - &lt;b>jQuery&lt;/b>-1-Ajax.pptx
Microsoft PowerPoint - &lt;b>jQuery&lt;/b>-1-Ajax.pptx
tutorialsruby
 
Web 10mca556 syllabs
Web 10mca556 syllabsWeb 10mca556 syllabs
Web 10mca556 syllabs
Ramesh Bindu
 
Presenter manual RIA technology (specially for summer interns)
Presenter manual RIA technology (specially for summer interns)Presenter manual RIA technology (specially for summer interns)
Presenter manual RIA technology (specially for summer interns)
XPERT INFOTECH
 
Syllibus web application
Syllibus web applicationSyllibus web application
Syllibus web application
Azizol Duralim
 
jQuery Comes to XPages
jQuery Comes to XPagesjQuery Comes to XPages
jQuery Comes to XPages
Teamstudio
 
Dot net-course-curriculumn
Dot net-course-curriculumnDot net-course-curriculumn
Dot net-course-curriculumn
Amit Sharma
 
Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)
Addy Osmani
 
What's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovationWhat's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovation
Marakana Inc.
 
Webdirections conference - @media
Webdirections conference - @mediaWebdirections conference - @media
Webdirections conference - @media
Glenn Cahill
 
SIVASOFT - BEST ONLINE WEB DEVELOPMENT TRAINING COURSE
SIVASOFT - BEST ONLINE WEB DEVELOPMENT TRAINING COURSESIVASOFT - BEST ONLINE WEB DEVELOPMENT TRAINING COURSE
SIVASOFT - BEST ONLINE WEB DEVELOPMENT TRAINING COURSE
sivasoft12
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
tutorialsruby
 
JavaScript and Ajax with &lt;b>jQuery&lt;/b>
JavaScript and Ajax with &lt;b>jQuery&lt;/b>JavaScript and Ajax with &lt;b>jQuery&lt;/b>
JavaScript and Ajax with &lt;b>jQuery&lt;/b>
tutorialsruby
 
Ui development Online Training from AkiraIT Solutions
Ui development Online Training from AkiraIT SolutionsUi development Online Training from AkiraIT Solutions
Ui development Online Training from AkiraIT Solutions
AkiraIT Solutions
 
Microsoft PowerPoint - &lt;b>jQuery&lt;/b>-1-Ajax.pptx
Microsoft PowerPoint - &lt;b>jQuery&lt;/b>-1-Ajax.pptxMicrosoft PowerPoint - &lt;b>jQuery&lt;/b>-1-Ajax.pptx
Microsoft PowerPoint - &lt;b>jQuery&lt;/b>-1-Ajax.pptx
tutorialsruby
 
Ad

Recently uploaded (20)

MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
Final Sketch Designs for poster production.pptx
Final Sketch Designs for poster production.pptxFinal Sketch Designs for poster production.pptx
Final Sketch Designs for poster production.pptx
bobby205207
 
Adam Grant: Transforming Work Culture Through Organizational Psychology
Adam Grant: Transforming Work Culture Through Organizational PsychologyAdam Grant: Transforming Work Culture Through Organizational Psychology
Adam Grant: Transforming Work Culture Through Organizational Psychology
Prachi Shah
 
LDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad UpdatesLDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad Updates
LDM & Mia eStudios
 
Ray Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big CycleRay Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big Cycle
Dadang Solihin
 
Nice Dream.pdf /
Nice Dream.pdf                              /Nice Dream.pdf                              /
Nice Dream.pdf /
ErinUsher3
 
IDF 30min presentation - December 2, 2024.pptx
IDF 30min presentation - December 2, 2024.pptxIDF 30min presentation - December 2, 2024.pptx
IDF 30min presentation - December 2, 2024.pptx
ArneeAgligar
 
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptxRai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Dr. Ravi Shankar Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025
EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025
EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025
Quiz Club of PSG College of Arts & Science
 
june 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptxjune 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptx
roger malina
 
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxDiptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Arshad Shaikh
 
How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18
Celine George
 
Unit 3 Poster Sketches with annotations.pptx
Unit 3 Poster Sketches with annotations.pptxUnit 3 Poster Sketches with annotations.pptx
Unit 3 Poster Sketches with annotations.pptx
bobby205207
 
Capitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptxCapitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptx
CapitolTechU
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptxOptimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
LDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDMMIA Free Reiki Yoga S9 Grad Level Intuition IILDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDM & Mia eStudios
 
Unit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdfUnit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdf
KRUTIKA CHANNE
 
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition OecdEnergy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
razelitouali
 
Black and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdfBlack and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdf
AnnasofiaUrsini
 
Pfeiffer "Secrets to Changing Behavior in Scholarly Communication: A 2025 NIS...
Pfeiffer "Secrets to Changing Behavior in Scholarly Communication: A 2025 NIS...Pfeiffer "Secrets to Changing Behavior in Scholarly Communication: A 2025 NIS...
Pfeiffer "Secrets to Changing Behavior in Scholarly Communication: A 2025 NIS...
National Information Standards Organization (NISO)
 
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
Final Sketch Designs for poster production.pptx
Final Sketch Designs for poster production.pptxFinal Sketch Designs for poster production.pptx
Final Sketch Designs for poster production.pptx
bobby205207
 
Adam Grant: Transforming Work Culture Through Organizational Psychology
Adam Grant: Transforming Work Culture Through Organizational PsychologyAdam Grant: Transforming Work Culture Through Organizational Psychology
Adam Grant: Transforming Work Culture Through Organizational Psychology
Prachi Shah
 
LDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad UpdatesLDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad Updates
LDM & Mia eStudios
 
Ray Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big CycleRay Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big Cycle
Dadang Solihin
 
Nice Dream.pdf /
Nice Dream.pdf                              /Nice Dream.pdf                              /
Nice Dream.pdf /
ErinUsher3
 
IDF 30min presentation - December 2, 2024.pptx
IDF 30min presentation - December 2, 2024.pptxIDF 30min presentation - December 2, 2024.pptx
IDF 30min presentation - December 2, 2024.pptx
ArneeAgligar
 
june 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptxjune 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptx
roger malina
 
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxDiptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Arshad Shaikh
 
How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18
Celine George
 
Unit 3 Poster Sketches with annotations.pptx
Unit 3 Poster Sketches with annotations.pptxUnit 3 Poster Sketches with annotations.pptx
Unit 3 Poster Sketches with annotations.pptx
bobby205207
 
Capitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptxCapitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptx
CapitolTechU
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptxOptimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
LDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDMMIA Free Reiki Yoga S9 Grad Level Intuition IILDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDM & Mia eStudios
 
Unit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdfUnit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdf
KRUTIKA CHANNE
 
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition OecdEnergy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
razelitouali
 
Black and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdfBlack and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdf
AnnasofiaUrsini
 

HTML CSS JavaScript jQuery Training

  • 1. Sreenath H B +91 988 646 5897 [email protected] © Copyright SREENATH H B, 2011 http://sreenath.net
  • 2. Training Agenda for HTML, CSS, JavaScript & jQuery Day 1 Session 1: Web Terminologies HTML Basics Lab: Our First HTML Page Session 2: CSS Basics Lab: Creating a 3 Column Layout Page Day 2: Session 1: HTML Forms Working with a Server Side Technology (ASP.NET) Lab: Creating a User Registration Form Session 2: Background Images, Pseudo Classes, Sprites Lab: Styling the User Registration Form © Copyright SREENATH H B, 2011 2
  • 3. Training Agenda Contd.. Day 3: Session 1: CSS Menus, Lists and Rounded Corners Lab: Adding a rounded cornered Drop Down menu to the User Registration Form Session 2: Browser Inconsistencies and how to handle them Lab: The Complete User Registration Process Mobile Web Design Overview Day 4: Session 1: JavaScript Overview Lab: JavaScript Programming Basics Session 2: DOM, HTML Forms and JavaScript Lab: User Registration Form Validation © Copyright SREENATH H B, 2011 3
  • 4. Training Agenda Contd.. Day 5: Session 1: Events and Event Handlers Error Handling and Debugging JavaScript Lab: Creating a JavaScript Modal Dialog Session 2: AJAX Overview Lab: Loading a remote file asynchronously Day 6 Session 1: jQuery Overview Lab: Alternate Row Styling Session 2: More jQuery Lab: Building a CSS Style Switcher © Copyright SREENATH H B, 2011 4
  • 5. Training Agenda Contd.. Day 7: Session 1: XML, JSON and JSONP AJAX in jQuery Lab: Ajaxifying the user registration form Session 2: Authoring Plugins Lab: Creating a Shadow Plugin` Performance Enhancement Techniques in Web Development Accessibility Guidelines and W3C Standards A note about SEO, Caching and Cookies © Copyright SREENATH H B, 2011 5
  • 6. Training Agenda for Advanced JavaScript & jQuery Day 1 : JavaScript Basics Session 1: Anatomy of a Web Page JavaScript Basics Types & Special Objects in JavaScript Lab: Basics of JavaScript Programming DOM Access & Manipulation Session 2: Lab: DOM Access & Manipulation JavaScript Events and Event Handlers JavaScript and Forms Errors and Debugging Techniques in JavaScript Lab: A User Registration Form © Copyright SREENATH H B, 2011 6
  • 7. Training Agenda Contd.. Day 2: JavaScript Advanced Session 1: Object Oriented JavaScript Functions as First Class Objects Scopes & Closures Objects & JSON Lab: Objects in JavaScript Session 2: JS Prototype Syntax Coding Standards & Design patterns Unobtrusive Programming Namespacing effectively Configuration Objects Private & Public Singleton pattern Module pattern Factory Pattern Lab: Events Unobtrusively, Object Members, Implementing Patterns, Adding methods to existing objects © Copyright SREENATH H B, 2011 7
  • 8. Training Agenda Contd.. Day 3: JavaScript & Ajax Session 1: Ajax overview Ajax using JavaScript Content Types & Mime Types Overview Lab: The Ajax Dictionary Session 2: Accessibility & Fallback Techniques Performance & Security Considerations Browser Considerations Lab: Design for Accessibility © Copyright SREENATH H B, 2011 8
  • 9. Training Agenda Contd.. Day 4: jQuery Session 1: jQuery Overview Selectors in jQuery The jQuery Context & the jQuery Object Each Lab: Page Load, Selectors & Basic Effects Session 2: Binding Events Ajax using jQuery Lab: Ajax enabled Accordion Post Assessment © Copyright SREENATH H B, 2011 9
  • 10. Components of the Web Computer Networks Network Addresses Browsers and Web Servers Hyper Text Transfer Protocol (HTTP) Hyper Text Markup Language (HTML) Web Applications © Copyright SREENATH H B, 2011 10
  • 11. Web Applications Static Page Request © Copyright SREENATH H B, 2011 11
  • 12. Web Applications Dymamic Page Request © Copyright SREENATH H B, 2011 12
  • 13. The Structure of a HTML Document <?xml ?> <!DOCTYPE/> <HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY></BODY> </HTML> © Copyright SREENATH H B, 2011 13
  • 14. !DOCTYPE <?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" <!DOCTYPE html PUBLIC "- encoding="UTF-8"?> //W3C//DTD XHTML 1.0 <!DOCTYPE HTML PUBLIC "- Transitional//EN" //W3C//DTD HTML 4.01 "http://www.w3.org/TR/xhtml1/ Transitional//EN" DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/html4/loo se.dtd"> <html xmlns="http://www.w3.org/199 <html> 9/xhtml" xml:lang="en" <head> lang="en"> <title></title> <head> </head> <title></title> <body </head> </body> <body> </html> </body> © Copyright SREENATH H B, 2011 </html> 14
  • 15. The Rules of HTML / XHTML HTML Is Not Case Sensitive, XHTML Is HTML/XHTML Attribute Values May Be Case Sensitive HTML/XHTML Is Sensitive to a Single White Space Character XHTML/HTML Follows a Content Model Elements Should Have Close Tags Unless Empty Unused Elements May Minimize Elements Should Nest In Correct Order Attribute Values Should Be Quoted Browsers Ignore Unknown Attributes and Elements © Copyright SREENATH H B, 2011 15
  • 16. Core Elements Headings ID, class, title BR, HR, P, SPAN, DIV Blockquote, Pre Lists – OL, UL © Copyright SREENATH H B, 2011 16
  • 18. CSS Positioning Display Pseudo Classes Pseudo Elements © Copyright SREENATH H B, 2011 18
  • 20. The Three Layers © Copyright SREENATH H B, 2011 20
  • 21. JavaScript Data Data Types – Number, String, Boolean Date Arrays, Associative Arrays If Statement Loops – While, Do-While, For Functions Scope of Variables Objects Regular Expressions © Copyright SREENATH H B, 2011 21
  • 22. Lab 1: JavaScript Basics Write a program in which you specify a date and the program outputs the number of days, months, years and weeks between the specified date and today. © Copyright SREENATH H B, 2011 22
  • 23. DOM Access & Manipulation getElementById getElementsByTagName © Copyright SREENATH H B, 2011 23
  • 24. Events Event Handlers this Event Listeners The event Object - Prevent Default Event Propagation – Capturing & Bubbling © Copyright SREENATH H B, 2011 24
  • 25. DOM 0 Event Handler W3C DOM Event Listener onblur blur onfocus focus onchange change onmouseover mouseover onmouseout mouseout onmousemove mousemove onmousedown mousedown onmouseup mouseup onclick click ondblclick dblclick onkeydown keydown onkeyup keyup onkeypress keypress onsubmit submit onload load © onunload B, 2011 Copyright SREENATH H unload 25
  • 26. Debugging and Error Handling How to Debug? Tools at hand – Firebug! JavaScript Debugger now supported in IE 8 onwards. Error Handling with Try-Catch © Copyright SREENATH H B, 2011 26
  • 27. Object Oriented JavaScript Why objects? Creating Object Definitions Reusing Objects JSON Overview Advanced Concepts Passing Parameters to Event Handlers/Listeners Functions accepting arbitrary number of parameters JavaScript Closures © Copyright SREENATH H B, 2011 27
  • 29. XMLHttpRequest IE 5 & 6 – new ActiveXObject(“Microsoft.XMLHTTP”); Open(Type, Url) Send(data) XMLHttpRequest object is non-reusable responseXML and responseText © Copyright SREENATH H B, 2011 29
  • 31. jQuery Overview What is jQuery actually? How browsers see HTML JSON Overview Downloading jQuery Including jQuery in your pages Hello World © Copyright SREENATH H B, 2011 31
  • 32. Selectors – The Heart of jQuery Element Selector $(“element”) ID Selector $(“#id”) Class Selector $(“.classname”) Ancestor Descendant $(“E F”) Parent Child $(“E > F”) Siblings – Adjacent & General Adjacent Sibling : $(“E + F”) General Siblings : $(“E ~ F”); Multiple Selectors $(“E, F, G”) © Copyright SREENATH H B, 2011 32
  • 33. Selectors Contd.. :first-child, :last:child, :only-child :nth-child(n) $(“li:first-child”); $(“tr:last-child”); $(“img:only-child”); $(“tr:nth-child(2n)”); Attribute Selectors Has Attribute: $(“img[alt]”); Begins With: $(“a[href^=mailto:]”); Ends With: $(“a[href$=.pdf]”); Contains: $(“a[href*=microsoft]”); Equals: $(“:checkbox[checked=true]”) :not(s), :empty, :eq(n), :contains(s) :even, :odd © Copyright SREENATH H B, 2011 33
  • 34. jQuery Tid-Bits The jQuery Object Looping with each(); this Chaining Closures Accessing DOM Objects Array Subscript – Unsafe .get(n) Making peace with other libraries – noConflict() Caching for performance © Copyright SREENATH H B, 2011 34
  • 35. DOM Traversal .filter() .siblings() .parent(), .children(), .parents() .next(), .nextAll(), .prev(), .prevAll(), .andSelf() .find() Manipulating Styles .addClass() .removeClass() .css(“height”, “35px”) © Copyright SREENATH H B, 2011 35
  • 36. Events Unobtrusive Programming Capturing vs. Bubbling; StopPropagation, preventDefault The Universal Page Load Binding Events to Elements, Triggering Events via Code Shorthands Blur, focus, select Change Click, Dblclick Mousedown, mouseup, mouseover, mouseout, mousemove Keyup, keydown, keypress Select Event Handler Context Passing additional parameters to events Compound Events Toggle, Hover Live, Die & Delegate! © Copyright SREENATH H B, 2011 36
  • 37. Effects & Animations Hide, Show fadeIn, fadeOut Toggle slideUp, slideDown slideToggle .animate() © Copyright SREENATH H B, 2011 37
  • 38. Working with Forms Form Selectors :text :checkbox :radio :image :submit :reset :password :file :input :button :enabled :disabled :checked :selected © Copyright SREENATH H B, 2011 38
  • 39. DOM Manipulation .text() .html() .val() .append(), prepend() .remove() .empty() .attr(), .removeAttr() addClass(), removeClass() Creating DOM Nodes insertAfter, after, insertBefore, before prependTo, appendTo .wrap() © Copyright SREENATH H B, 2011 39
  • 40. AJAX .load(“a.html”) .getJSON(“b.json”); .get(“c.xml”); .post(“d.php”); .ajax({ url:””, type:”GET”, dataType: “html”, success: function(data){ }, error: function(xhr){ } }) © Copyright SREENATH H B, 2011 40
  • 41. Authoring Plugins (function($){ $.fn.myPlugin = function(options){ var defaults = { }; options = $.extend(defaults, options); return this.each(function(){ //My Code for selected elements }); } })(jQuery); //Calling $(“selector”).myPlugin({options}) © Copyright SREENATH H B, 2011 41
  • 42. jQuery Best Practices – Tips & Tricks Select directly using an ID selector where possible Cache objects if using repeatedly Chain as long as possible Reduce Direct DOM Manipulation Be wary of selectors in loops or each() Leverage Event Delegation where possible Defer loading to window.load Don’t use jQuery where its not needed! Conditionally loading jQuery locally © Copyright SREENATH H B, 2011 42
  • 43. OOJ – Object Oriented JavaScript JavaScript is a Prototype based Language Closures JSON Extending Native Objects Getter/Setter Arrays & Objects – Library -> Books -> Authors © Copyright SREENATH H B, 2011 43
  • 44. Lab Create a class for Cartesian Co-Ordinate System of Points. A Point has 2 properties, Latitude and Longitude. Create 2 point objects, set their co-ordinates using their constructors and provide a member function to find the simple X & Y distance between them. Distance can be represented as another Point object. X distance = x1.Longitude – x2.Longitude Y distance = x1.Latitude – x1.Latitude User interactivity is a bonus. © Copyright SREENATH H B, 2011 44
  • 45. JSON var myJSONObject = { “People": [ {“Name": “Tom", “Age": “25", “Email": “[email protected]"}, {“Name": “Dick", “Age": “24", “Email": “[email protected]"}, {“Name": “Harry", “Age": “26", “Email": “[email protected]"} ] }; var myObject = JSON.parse(myJSONtext); var myJSONText = JSON.stringify(myObject, replacer); © Copyright SREENATH H B, 2011 45
  • 47. XMLHttpRequest IE 5 & 6 – new ActiveXObject(“Microsoft.XMLHTTP”); Open(Type, Url) Send(data) XMLHttpRequest object is non-reusable responseXML and responseText © Copyright SREENATH H B, 2011 47
  • 48. Design Patterns in JavaScript Singleton Module Module Syntax Accesing Globals Module Export Factory © Copyright SREENATH H B, 2011 48
  • 49. References Dive Into Accessibility http://diveintoaccessibility.org/ Dive into HTML5 http://diveintohtml5.org/ Books Pro JavaScript Design Patterns by Dustin Diaz Object Oriented JavaScript by Stoyan Stefanov Advanced JavaScript 3rd Ed by Chuck Easttom Learning jQuery 1.3 © Copyright SREENATH H B, 2011 50