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

Más contenido relacionado

La actualidad más candente

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_uDoris Chen
 
Seminar: Become a Reliable Web Programmer
Seminar: Become a Reliable Web ProgrammerSeminar: Become a Reliable Web Programmer
Seminar: Become a Reliable Web ProgrammerAchmad 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 7Mediacurrent
 
Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016Doris Chen
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web DesignMike 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 DevelopmentEvan Mullins
 
Web Components v1
Web Components v1Web Components v1
Web Components v1Mike Wilcox
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application developmentzonathen
 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsIvano 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 webIvano 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 DeveloperEdureka!
 
Web Standards And Protocols
Web Standards And ProtocolsWeb Standards And Protocols
Web Standards And ProtocolsSteven 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 developerHsuan Fu Lien
 

La actualidad más candente (20)

What is front-end development ?
What is front-end development ?What is front-end development ?
What is front-end development ?
 
What is jQuery?
What is jQuery?What is jQuery?
What is jQuery?
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_u
 
Seminar: Become a Reliable Web Programmer
Seminar: Become a Reliable Web ProgrammerSeminar: Become a Reliable Web Programmer
Seminar: Become a Reliable Web Programmer
 
Sai Sharan_UI_Resume
Sai Sharan_UI_ResumeSai Sharan_UI_Resume
Sai Sharan_UI_Resume
 
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
 
Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!
 
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
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile apps
 
Web Standards
Web StandardsWeb Standards
Web Standards
 
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)
 
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
 
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
 
Web Standards And Protocols
Web Standards And ProtocolsWeb Standards And Protocols
Web Standards And Protocols
 
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]
 
Understand front end developer
Understand front end developerUnderstand front end developer
Understand front end developer
 

Destacado

Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/jsKnoldus Inc.
 
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScriptHTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScriptTodd 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 onBalveer 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 ScriptFahim Abdullah
 
Computer science seminar topics
Computer science seminar topicsComputer science seminar topics
Computer science seminar topics123seminarsonly
 
Best topics for seminar
Best topics for seminarBest topics for seminar
Best topics for seminarshilpi nagpal
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011photomatt
 

Destacado (10)

Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScriptHTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
 
Introducción a HTML - CSS - JS
Introducción a HTML - CSS - JS Introducción a HTML - CSS - JS
Introducción a HTML - CSS - JS
 
Technical seminar report on
Technical seminar report onTechnical seminar report on
Technical seminar report on
 
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
 
Computer science seminar topics
Computer science seminar topicsComputer science seminar topics
Computer science seminar topics
 
Html JavaScript and CSS
Html JavaScript and CSSHtml JavaScript and CSS
Html JavaScript and CSS
 
Best topics for seminar
Best topics for seminarBest topics for seminar
Best topics for seminar
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011
 

Similar a HTML CSS JavaScript jQuery Training

2015 advanced-web-programming
2015 advanced-web-programming2015 advanced-web-programming
2015 advanced-web-programmingAkshay Iliger
 
00 JavaScript Part 1 Course - Introduction
00 JavaScript Part 1 Course - Introduction00 JavaScript Part 1 Course - Introduction
00 JavaScript Part 1 Course - IntroductionTommy Vercety
 
QA Automation testing online training
QA Automation testing online trainingQA Automation testing online training
QA Automation testing online trainingDivya Shree
 
QA Automation Testing Online Training in India
QA Automation Testing Online Training in IndiaQA Automation Testing Online Training in India
QA Automation Testing Online Training in Indiaunited global soft
 
QA Automation Testing Online Training in India
QA Automation Testing Online Training in IndiaQA Automation Testing Online Training in India
QA Automation Testing Online Training in Indiaunited global soft
 
QA Automation Testing Online Training in Hyderabad
QA Automation Testing Online Training in HyderabadQA Automation Testing Online Training in Hyderabad
QA Automation Testing Online Training in Hyderabadunited global soft
 
6 Weeks Project Based Summer Training
6 Weeks Project Based Summer Training6 Weeks Project Based Summer Training
6 Weeks Project Based Summer TrainingTech Mentro
 
Introduction To J Boss Seam
Introduction To J Boss SeamIntroduction To J Boss Seam
Introduction To J Boss Seamashishkulkarni
 
QA Automation Testing Training in Hyderabad
QA Automation Testing Training in HyderabadQA Automation Testing Training in Hyderabad
QA Automation Testing Training in Hyderabadunited global soft
 
Pal gov.tutorial1.session5.subtyperelationsandotherconstraints
Pal gov.tutorial1.session5.subtyperelationsandotherconstraintsPal gov.tutorial1.session5.subtyperelationsandotherconstraints
Pal gov.tutorial1.session5.subtyperelationsandotherconstraintsMustafa Jarrar
 
Pal gov.tutorial1.session7 2.finalcheckandschemaengineeringissues
Pal gov.tutorial1.session7 2.finalcheckandschemaengineeringissuesPal gov.tutorial1.session7 2.finalcheckandschemaengineeringissues
Pal gov.tutorial1.session7 2.finalcheckandschemaengineeringissuesMustafa Jarrar
 
Full stack web development
Full stack web developmentFull stack web development
Full stack web developmentCrampete
 
Industrial Summer Training for MCA/BCA/BE/B-Tech Students
Industrial Summer Training for MCA/BCA/BE/B-Tech StudentsIndustrial Summer Training for MCA/BCA/BE/B-Tech Students
Industrial Summer Training for MCA/BCA/BE/B-Tech StudentsTech Mentro
 
Difference between java script and jquery
Difference between java script and jqueryDifference between java script and jquery
Difference between java script and jqueryUmar Ali
 
Node.js an introduction
Node.js   an introductionNode.js   an introduction
Node.js an introductionMeraj Khattak
 

Similar a HTML CSS JavaScript jQuery Training (20)

2015 advanced-web-programming
2015 advanced-web-programming2015 advanced-web-programming
2015 advanced-web-programming
 
00 JavaScript Part 1 Course - Introduction
00 JavaScript Part 1 Course - Introduction00 JavaScript Part 1 Course - Introduction
00 JavaScript Part 1 Course - Introduction
 
QA Automation testing online training
QA Automation testing online trainingQA Automation testing online training
QA Automation testing online training
 
QA Automation Testing Online Training in India
QA Automation Testing Online Training in IndiaQA Automation Testing Online Training in India
QA Automation Testing Online Training in India
 
QA Automation Testing Online Training in India
QA Automation Testing Online Training in IndiaQA Automation Testing Online Training in India
QA Automation Testing Online Training in India
 
QA Automation Testing Online Training in Hyderabad
QA Automation Testing Online Training in HyderabadQA Automation Testing Online Training in Hyderabad
QA Automation Testing Online Training in Hyderabad
 
6 Weeks Project Based Summer Training
6 Weeks Project Based Summer Training6 Weeks Project Based Summer Training
6 Weeks Project Based Summer Training
 
Introduction To J Boss Seam
Introduction To J Boss SeamIntroduction To J Boss Seam
Introduction To J Boss Seam
 
QA Automation Testing Training in Hyderabad
QA Automation Testing Training in HyderabadQA Automation Testing Training in Hyderabad
QA Automation Testing Training in Hyderabad
 
Lishit Resume
Lishit ResumeLishit Resume
Lishit Resume
 
Pal gov.tutorial1.session5.subtyperelationsandotherconstraints
Pal gov.tutorial1.session5.subtyperelationsandotherconstraintsPal gov.tutorial1.session5.subtyperelationsandotherconstraints
Pal gov.tutorial1.session5.subtyperelationsandotherconstraints
 
Pal gov.tutorial1.session7 2.finalcheckandschemaengineeringissues
Pal gov.tutorial1.session7 2.finalcheckandschemaengineeringissuesPal gov.tutorial1.session7 2.finalcheckandschemaengineeringissues
Pal gov.tutorial1.session7 2.finalcheckandschemaengineeringissues
 
Microsoft .Net
Microsoft .NetMicrosoft .Net
Microsoft .Net
 
C Lokesh Reddy CV
C Lokesh Reddy CVC Lokesh Reddy CV
C Lokesh Reddy CV
 
Full stack web development
Full stack web developmentFull stack web development
Full stack web development
 
Liferay Training Content
Liferay Training ContentLiferay Training Content
Liferay Training Content
 
Industrial Summer Training for MCA/BCA/BE/B-Tech Students
Industrial Summer Training for MCA/BCA/BE/B-Tech StudentsIndustrial Summer Training for MCA/BCA/BE/B-Tech Students
Industrial Summer Training for MCA/BCA/BE/B-Tech Students
 
Difference between java script and jquery
Difference between java script and jqueryDifference between java script and jquery
Difference between java script and jquery
 
Node.js an introduction
Node.js   an introductionNode.js   an introduction
Node.js an introduction
 
Jquery
JqueryJquery
Jquery
 

Último

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 

Último (20)

Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 

HTML CSS JavaScript jQuery Training

  • 1. Sreenath H B +91 988 646 5897 mail@sreenath.net © 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": “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
  • 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