CS7026. Introduction to jquery

Size: px
Start display at page:

Download "CS7026. Introduction to jquery"

Transcription

1 CS7026 Introduction to jquery

2 What is jquery? jquery is a cross-browser JavaScript Library. A JavaScript library is a library of pre-written JavaScript which allows for easier development of JavaScript-based applications. It was released in January 2006 at BarCamp NYC by John Resig. It is free, open source software Dual-licensed under the MIT License and the GNU General Public License. 2

3 What is jquery? jquery's syntax is designed to make it easier to navigate a document, select DOM elements, create animations, handle events, and develop Ajax applications. jquery also provides capabilities for developers to create plug-ins on top of the JavaScript library. The modular approach to the jquery library allows the creation of dynamic web pages and web applications. Essentially jquery greatly simplifies JavaScript programming. 3

4 What is jquery? jquery wraps common tasks that normally take many lines of JavaScript into methods that you can call with a single line of code. The jquery library contains the following features: HTML/DOM manipulation CSS manipulation HTML event methods Effects and animations Utilities 4

5 Why jquery? There are other JavaScript frameworks, but jquery seems to be the most popular. It is also the most extendable. It s easy to use: This is pretty much the main advantage of using JQuery, it is a lot more easy to use compared to standard JavaScript and other JavaScript libraries. 5

6 Why jquery? It is fast: Simple and cleaner code, no need to write several lines of codes to achieve complex functionality. It helps to improve the performance of the application It is cross-browser compatible: As the developers have already taken cross-browser issues into account, jquery will run exactly the same in all major browsers. It is extensible: jquery can be extended to implement customised behaviour. 6

7 Why jquery? Strong opensource community. Good documentation and tutorials. No need to learn fresh new syntaxes to use jquery, knowing simple JavaScript syntax is enough 7

8 Getting Started There are several ways to start using jquery on your web site. You can: 1. Download the jquery library from jquery.com 2. Include jquery from a CDN, like Google 8

9 1. Downloading jquery There are two versions of jquery available for downloading: Production version - this is for your live website because it has been minified and compressed Development version - this is for testing and development (uncompressed and readable code) Both versions can be downloaded from jquery.com. 9

10 Including jquery in your Page The jquery library is a single JavaScript file, and you reference it with the HTML <script> tag. Note that the <script> tag should be inside the <head> section. <head> <script src="jquery min.js"></script> </head> Here the downloaded file is in the same directory as the pages where it is being used. 10

11 Including jquery from a CDN CDN Stands for Content Distribution Network or Content Delivery Network. This consists of a large distributed system of servers deployed in multiple data centres. The goal of a CDN is to serve content to end-users with high availability and high performance. In a CDN the client accesses a copy of the data nearest to the client location rather than all clients accessing it from one particular server. This helps to achieve faster data retrieval by the client. 11

12 Including jquery from a CDN The following CDNs host jquery files: 1. jquery's CDN: To see all available files and versions, visit To use the jquery CDN, just reference the file directly from in the script tag: <script src=" min.js"integrity="sha256- FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> 12

13 Including jquery from a CDN The integrity and crossorigin attributes are used for Subresource Integrity (SRI) checking. This allows browsers to ensure that resources hosted on third-party servers have not been tampered with. Use of SRI is recommended as a best-practice, whenever libraries are loaded from a third-party source. Read more at srihash.org 13

14 Including jquery from a CDN 2. Microsoft: The jquery file can be loaded from Microsoft AJAX CDN. For more details, go to You will need to put the following code in your page: <script src= " min.js"></script> 14

15 Including jquery from a CDN 3. Google The jquery file can be loaded from Google CDN. For more details, go to jquery. You will need to put the following code in your page. <script src=" /jquery.min.js"></script> 15

16 Why Load the JQuery file from a CDN? Why load the jquery file from the CDNs rather than your own server? Remember when a browser loads any webpage, it puts related files (eg. JavaScript files, CSS files and images) used for that page into its cache. When the user next browses any web page, the browser loads only those files that are new or modified and are not available in the browser cache. In this way, the browser improves its performance and loads pages faster. 16

17 Why Load the JQuery file from a CDN? There is a possibility that the user might have already browsed some other web pages that are using the CDN s jquery file and that file may already be in the cache. In this way your page will load faster as the browser will not have to load the jquery file for your page again. 17

18 jquery Syntax With jquery you select (query) HTML elements and perform "actions" on them. The basic syntax is: $(selector).action() A $ sign to define/access jquery A (selector) to "query (or find)" HTML elements A jquery action() to be performed on the element(s) 18

19 jquery Syntax Examples: hide the current element: $(this).hide() hide all <p> elements: $("p").hide() hide all elements with class="test": $(".test").hide() hide the element with id="test": $("#test").hide() 19

20 The Document Ready Event To ensure that their code runs after the browser finishes loading the document, many JavaScript programmers wrap their code in an onload function: window.onload = function() { alert("welcome"); } Unfortunately, the code doesn't run until all images are finished downloading (including, say, banner ads). To run code as soon as the document is ready to be manipulated, jquery has a statement known as the ready event : $( document ).ready( function() { // Your code here }); 20

21 The Document Ready Event For example, inside the ready event, you can add a click handler to the link: $( document ).ready(function() { $("a").click(function( event ) { alert("thanks for visiting!"); }); }); 21

22 jquery Selectors jquery selectors allow you to select and manipulate HTML element(s). With jquery selectors you can find elements based on their id, classes, types, attributes, values of attributes and much more. It's based on the existing CSS Selectors, and in addition, it has some own custom selectors. 22

23 jquery Selectors All type of selectors in jquery, start with the dollar sign and parentheses: $(). The element Selector The jquery element selector selects elements based on their tag names. You can select all <p> elements on a page like this: $("p") Let s pause for a moment and put all of this together: 23

24 <!DOCTYPE html> <html> <head> <script src=" min.js"></script> <script> $(document).ready(function(){ $("p").click(function(){ $(this).hide(); }); }); </script> </head> <body> <p>if you click on me, I will disappear.</p> <p>click me away!</p> <p>click me too!</p> </body> </html> 24

25 Including jquery in your Page Note that in practice, it is usually better to place your code in a separate JS file and load it on the page with a <script> element's src attribute. <html> <head> <script src=" min.js"></script> <script src="hide.js"> </script> </head> 25

26 jquery Selectors The #id Selector Uses the id attribute of a HTML tag to find the specific element. An id should be unique within a page, so you should use the #id selector when you want to find a single, unique element. To find an element with a specific id, write a hash character, followed by the id of the element: $("#btnsayhello") This would find <button id="btnsayhello" type="button">say Hello!</button> 26

27 jquery Selectors The.class Selector Finds elements with a specific class. Write a full stop, followed by the name of the class: $(".btnhideme") This would find <button class= btnhideme" type="button">hide Me!</button> 27

28 jquery Selectors More Examples Selects all elements $("*") Selects the current HTML element $(this) Selects all <p> elements with class="intro $("p.intro") Selects the first <p> element $("p:first") 28

29 jquery Selectors More Examples Selects the first <li> element of every <ul> $("ul li:first-child") Selects all elements with a href attribute $("[href]") Selects all <a> elements with a target attribute value equal to "_blank $("a[target='_blank']") Selects all <a> elements with a target attribute value NOT equal to "_blank $("a[target!='_blank']") 29

30 jquery Selectors More Examples Selects all <button> elements and <input> elements of type="button $(":button") Selects all even <tr> elements $("tr:even") Selects all odd <tr> elements $("tr:odd") 30

31 Hello World Let s have a closer look at a Hello World example. We start with an empty html page: <html> <head> <script src=" min.js"></script><script> // we will add our code here </script> </head> <body> <!-- we will add our HTML content here --> </body> </html> 31

32 Hello World This page just loads the jquery.js library. Two comments indicate where we will expand this template with code. Remember, as almost everything we do when using jquery reads or manipulates the document object model (DOM), we need to make sure that we start adding events etc. as soon as the DOM is ready. 32

33 Hello World To do this, we register a ready event for the document: $(document).ready(function() { // do stuff when DOM is ready }); 33

34 Hello World We want to show an alert when clicking a link. So add the following to the <body>: <a href="">link</a> Now update the $(document).ready handler: $(document).ready(function() { $("a").click(function() { alert("hello world!"); }); }); 34

35 Hello World This should show the alert as soon as you click on the link. In fact it should show the alert as soon as you open any link. 35

36 Hello World Let's have a look at what we are doing: $("a") is a jquery selector, in this case, it selects all a elements. $ itself is an alias for the jquery "class", therefore $() constructs a new jquery object which can then access all the jquery methods etc. The click() function we call next is a method of the jquery object. It binds a click event to all selected elements (in this case, a single anchor element) and executes the provided function when the event occurs. 36

37 Hello World This is similar to the following JavaScript code: <a href="" onclick="alert('hello world')">link</a> The difference is quite obvious: We don't need to write an onclick for every single element. We have a clean separation of structure (HTML) and behaviour (JS), just as we separate structure and presentation by using CSS. 37

38 Using Selectors We are going to look at using some more of the selectors we have encountered. We will look at selecting and modifying the first ordered list in a html page. <ol id="orderedlist"> <li>first element</li> <li>second element</li> <li>third element</li> </ol> 38

39 Using Selectors To get started, we want to select the list itself. The list has an ID "orderedlist". In classic JavaScript, you could select it by using: document.getelementbyid("orderedlist") With jquery, we do it like this: $(document).ready(function() { $("#orderedlist").addclass("red"); }); 39

40 Using Selectors The page is linked to a stylesheet (red.css) with a class.red that simply adds a red background. Therefore, when you reload the page in your browser, you should see that the first ordered list has a red background. The second list is not modified. Now let s add some more classes to the child elements of this list. 40

41 Using Selectors $(document).ready(function() { $("#orderedlist").addclass("red"); }); $("#orderedlist > li").addclass("blue"); }); This selects all child <li>s of the element with the id orderedlist and adds the class.blue from the stylesheet. 41

42 Using Selectors Now for something a little more sophisticated: We want to add and remove the class when the user hovers over the li element, but only on the last element in the list. $(document).ready(function() { $("#orderedlist").addclass("red"); }); $("#orderedlist > li").addclass("blue"); $("#orderedlist li:last").hover(function() { $(this).addclass("green"); },function(){ $(this).removeclass("green"); }); }); 42

43 Using Selectors There is more $(document).ready(function() { $("#orderedlist").find("li").each(function(i) { }); }); $(this).append( " BAM! " + i ); 43

44 Using Selectors find() allows you to further search the descendants of the already selected elements. Therefore in this case $("#orderedlist").find("li")is the same as $("#orderedlist li"). each() iterates over every element and allows further processing. append()is used to append some text to it and set it as text to the end of each element. 44

45 Using Selectors An additional challenge is to select only certain elements from a group of similar or identical ones. jquery provides filter() and not() for this. filter() reduces the selection to the elements that fit the filter expression. not() does the contrary and removes all elements that fit the expression. 45

46 Using Selectors Think of an unordered list where you want to select all li elements that have no ul children. $(document).ready(function() { }); $("li").not(":has(ul)").css("border", "1px solid black"); This selects all li elements that have a ul element as a child and removes all elements from the selection. Therefore all li elements get a border, except the one that has a child ul. 46

47 Using Selectors The [expression] syntax can be used to filter by attributes. Maybe you want to select all anchors that have a name attribute: $(document).ready(function() { $("a[name]").css("background", "#e00" ); }); This adds a background colour to all anchor elements with a name attribute. 47

48 Using Selectors More often than selecting anchors by name, you might need to select anchors by their href attribute. To match only a part of the value, we can use the contains select ("*=") instead of an equals ("="): 48

49 Using Selectors $(document).ready(function() { }); $("a[href*='/content/gallery']").click(function() { // do something with all links that point somewhere to /content/gallery }); 49

50 Using Selectors Until now, all selectors were used to select children or filter the current selection. There are situations where you need to select the previous or next elements, known as siblings. Think of a FAQ page, where all answers are hidden first, and shown, when the question is clicked. 50

51 Using Selectors $(document).ready(function() { $('#faq').find('dd').hide().end().find('dt'). }); click(function() { }); $(this).next().slidetoggle(); Here we use some chaining to reduce the code size and gain better performance, as #faq is only selected once. 51

52 Using Selectors By using end(), the first find() is undone, so we can start search with the next find() at our #faq element, instead of the dd s children. Within the click handler, the function passed to the click() method, we use $(this).next() to find the next sibling starting from the current dt. This allows us to quickly select the answer following the clicked question. 52

53 Using Selectors In addition to siblings, you can also select parent elements. Maybe you want to highlight the paragraph that is the parent of the link the user hovers. Try this: $(document).ready(function(){ $("a").hover(function(){ $(this).parents("p").addclass("highlight"); },function(){ $(this).parents("p").removeclass("highlight"); }); }); For all hovered anchor elements, the parent paragraph is searched and a class "highlight" from the CSS added and removed. 53

54 Using Selectors Lets go one step back before continuing: jquery is a lot about making code shorter and therefore easier to read and maintain. The following is a shortcut for the $(document).ready(callback)notation: $(function() { }); // code to execute when the DOM is ready 54

55 Using Selectors Applied to the Hello world! example, we end with this: $(function() { $("a").click(function() { alert("hello world!"); }); }); 55

Session 17. jquery. jquery Reading & References

Session 17. jquery. jquery Reading & References Session 17 jquery 1 Tutorials jquery Reading & References http://learn.jquery.com/about-jquery/how-jquery-works/ http://www.tutorialspoint.com/jquery/ http://www.referencedesigner.com/tutorials/jquery/jq_1.php

More information

JQuery. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010

JQuery. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010 Lecture 23 JQuery Announcements HW#8 posted, due 12/3 HW#9 posted, due 12/10 HW#10 will be a survey due 12/14 Yariv will give Thursday lecture on privacy, security Yes, it will be on the exam! 1 Project

More information

SEEM4570 System Design and Implementation Lecture 04 jquery

SEEM4570 System Design and Implementation Lecture 04 jquery SEEM4570 System Design and Implementation Lecture 04 jquery jquery! jquery is a JavaScript Framework.! It is lightweight.! jquery takes a lot of common tasks that requires many lines of JavaScript code

More information

JQUERY. jquery is a very popular JavaScript Library. jquery greatly simplifies JavaScript programming. jquery is easy to learn.

JQUERY. jquery is a very popular JavaScript Library. jquery greatly simplifies JavaScript programming. jquery is easy to learn. JQUERY jquery is a very popular JavaScript Library. jquery greatly simplifies JavaScript programming. jquery is easy to learn. JQuery 1/18 USING JQUERY Google CDN:

More information

Tizen Web UI Technologies (Tizen Ver. 2.3)

Tizen Web UI Technologies (Tizen Ver. 2.3) Tizen Web UI Technologies (Tizen Ver. 2.3) Spring 2015 Soo Dong Kim, Ph.D. Professor, Department of Computer Science Software Engineering Laboratory Soongsil University Office 02-820-0909 Mobile 010-7392-2220

More information

CSC 337. jquery Rick Mercer

CSC 337. jquery Rick Mercer CSC 337 jquery Rick Mercer What is jquery? jquery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

More information

jquery Tutorial for Beginners: Nothing But the Goods

jquery Tutorial for Beginners: Nothing But the Goods jquery Tutorial for Beginners: Nothing But the Goods Not too long ago I wrote an article for Six Revisions called Getting Started with jquery that covered some important things (concept-wise) that beginning

More information

Web applications design

Web applications design Web applications design Semester B, Mandatory modules, ECTS Units: 3 http://webdesign.georgepavlides.info http://georgepavlides.info/tools/html_code_tester.html George Pavlides http://georgepavlides.info

More information

Getting started with jquery MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

Getting started with jquery MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University Getting started with jquery MIS 2402 Konstantin Bauman Department of MIS Fox School of Business Temple University Exam 2 Date: 11/06/18 four weeks from now! JavaScript, jquery 1 hour 20 minutes Use class

More information

Chapter 9 Introducing JQuery

Chapter 9 Introducing JQuery Chapter 9 Introducing JQuery JQuery is a JavaScript library, designed to make writing JavaScript simpler and so it is useful for managing inputs and interactions with a page visitor, changing the way a

More information

JQuery WHY DIDN T WE LEARN THIS EARLIER??!

JQuery WHY DIDN T WE LEARN THIS EARLIER??! JQuery WHY DIDN T WE LEARN THIS EARLIER??! Next couple of weeks This week: Lecture: Security, jquery, Ajax Next Week: No lab (Easter) I may post a bonus (jquery) lab No quiz (yay!) Maybe a bonus one? Snuneymuxw

More information

User Interaction: jquery

User Interaction: jquery User Interaction: jquery Assoc. Professor Donald J. Patterson INF 133 Fall 2012 1 jquery A JavaScript Library Cross-browser Free (beer & speech) It supports manipulating HTML elements (DOM) animations

More information

Why Use A JavaScript Library?

Why Use A JavaScript Library? Using JQuery 4 Why Use A JavaScript Library? Okay, first things first. Writing JavaScript applications from scratch can be difficult, time-consuming, frustrating, and a real pain in the, ahem, britches.

More information

Web Technologies II + Project Management for Web Applications

Web Technologies II + Project Management for Web Applications Web Engineering Web Technologies II + Project Management for Web Applications Copyright 2015 Ioan Toma & Nelia Lassiera 1 Where are we? # Date Title 1 5 th March Web Engineering Introduction and Overview

More information

Webomania Solutions Pvt. Ltd. 2017

Webomania Solutions Pvt. Ltd. 2017 Introduction JQuery is a lightweight, write less do more, and JavaScript library. The purpose of JQuery is to make it much easier to use JavaScript on the website. JQuery takes a lot of common tasks that

More information

AR0051: Digital Presentation Portfolio. AR0051 JQuery. Nord-Jan Vermeer Henry Kiksen. Challenge the future

AR0051: Digital Presentation Portfolio. AR0051 JQuery. Nord-Jan Vermeer Henry Kiksen. Challenge the future AR0051 JQuery Nord-Jan Vermeer Henry Kiksen 1 Topics When to use javascript/jquery Why JQuery Loading JQuery One JQuery program explained Effects/Events Selector Demos 2 When to use Javascript/Jquery Do

More information

WELCOME TO JQUERY PROGRAMMING LANGUAGE ONLINE TUTORIAL

WELCOME TO JQUERY PROGRAMMING LANGUAGE ONLINE TUTORIAL WELCOME TO JQUERY PROGRAMMING LANGUAGE ONLINE TUTORIAL 1 The above website template represents the HTML/CSS previous studio project we have been working on. Today s lesson will focus on JQUERY programming

More information

JavaScript Lecture 3c (jquery)

JavaScript Lecture 3c (jquery) JavaScript Lecture 3c (jquery) Waterford Institute of Technology June 18, 2016 John Fitzgerald Waterford Institute of Technology, JavaScriptLecture 3c (jquery) 1/28 JavaScript Introduction Topic discussed

More information

Introduction to. Maurizio Tesconi May 13, 2015

Introduction to. Maurizio Tesconi May 13, 2015 Introduction to Maurizio Tesconi May 13, 2015 What is? Most popular, cross- browser JavaScript library Focusing on making client- side scripcng of HTML simpler Open- source, first released in 2006 Current

More information

Understanding this structure is pretty straightforward, but nonetheless crucial to working with HTML, CSS, and JavaScript.

Understanding this structure is pretty straightforward, but nonetheless crucial to working with HTML, CSS, and JavaScript. Extra notes - Markup Languages Dr Nick Hayward HTML - DOM Intro A brief introduction to HTML's document object model, or DOM. Contents Intro What is DOM? Some useful elements DOM basics - an example References

More information

Website Development Lecture 18: Working with JQuery ================================================================================== JQuery

Website Development Lecture 18: Working with JQuery ================================================================================== JQuery JQuery What You Will Learn in This Lecture: What jquery is? How to use jquery to enhance your pages, including adding rich? Visual effects and animations. JavaScript is the de facto language for client-side

More information

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) What is JavaScript?

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) What is JavaScript? Web Development & Design Foundations with HTML5 Ninth Edition Chapter 14 A Brief Look at JavaScript and jquery Slides in this presentation contain hyperlinks. JAWS users should be able to get a list of

More information

AR0051 JQuery. Michelle Bettman Henry Kiksen. Challenge the future

AR0051 JQuery. Michelle Bettman Henry Kiksen. Challenge the future AR0051 JQuery Michelle Bettman Henry Kiksen 1 Topics When to use javascript/jquery Why JQuery Loading JQuery One JQuery program explained Effects/Events Selector Demos 2 When to use Javascript/Jquery Do

More information

Web Design. Lecture 7. Instructor : Cristina Mîndruță Site : https://sites.google.com/site/webdescm. Cristina Mindruta - Web Design

Web Design. Lecture 7. Instructor : Cristina Mîndruță Site : https://sites.google.com/site/webdescm. Cristina Mindruta - Web Design Web Design Lecture 7 Instructor : Cristina Mîndruță Site : https://sites.google.com/site/webdescm Select HTML elements in JavaScript Element objects are selected by a). id, b). type, c). class, d). shortcut

More information

Web Development & Design Foundations with HTML5

Web Development & Design Foundations with HTML5 1 Web Development & Design Foundations with HTML5 CHAPTER 14 A BRIEF LOOK AT JAVASCRIPT Copyright Terry Felke-Morris 2 Learning Outcomes In this chapter, you will learn how to: Describe common uses of

More information

for Lukas Renggli ESUG 2009, Brest

for Lukas Renggli ESUG 2009, Brest for Lukas Renggli ESUG 2009, Brest John Resig, jquery.com Lightweight, fast and concise - Document traversing - Event Handling - AJAX Interaction - Animating High-level, themeable widgets on top of JQuery.

More information

Client Side JavaScript and AJAX

Client Side JavaScript and AJAX Client Side JavaScript and AJAX Client side javascript is JavaScript that runs in the browsers of people using your site. So far all the JavaScript code we've written runs on our node.js server. This is

More information

Cascading Style Sheet

Cascading Style Sheet Extra notes - Markup Languages Dr Nick Hayward CSS - Basics A brief introduction to the basics of CSS. Contents Intro CSS syntax rulesets comments display Display and elements inline block-level CSS selectors

More information

JavaScript: Events, the DOM Tree, jquery and Timing

JavaScript: Events, the DOM Tree, jquery and Timing JavaScript: Events, the DOM Tree, jquery and Timing CISC 282 October 11, 2017 window.onload Conflict Can only set window.onload = function once What if you have multiple files for handlers? What if you're

More information

SEEM4570 System Design and Implementation. Lecture 3 Cordova and jquery

SEEM4570 System Design and Implementation. Lecture 3 Cordova and jquery SEEM4570 System Design and Implementation Lecture 3 Cordova and jquery Prepare a Cordova Project Assume you have installed all components successfully and initialized a project. E.g. follow Lecture Note

More information

Week 8 Google Maps. This week you ll learn how to embed a Google Map into a web page and add custom markers with custom labels.

Week 8 Google Maps. This week you ll learn how to embed a Google Map into a web page and add custom markers with custom labels. Introduction Hopefully by now you ll have seen the possibilities that jquery provides for rich content on web sites in the form of interaction and media playback. This week we ll be extending this into

More information

Introduction to HTML & CSS. Instructor: Beck Johnson Week 2

Introduction to HTML & CSS. Instructor: Beck Johnson Week 2 Introduction to HTML & CSS Instructor: Beck Johnson Week 2 today Week One review and questions File organization CSS Box Model: margin and padding Background images and gradients with CSS Make a hero banner!

More information

HTML5 and CSS3 The jquery Library Page 1

HTML5 and CSS3 The jquery Library Page 1 HTML5 and CSS3 The jquery Library Page 1 1 HTML5 and CSS3 THE JQUERY LIBRARY 8 4 5 7 10 11 12 jquery1.htm Browser Compatibility jquery should work on all browsers The solution to cross-browser issues is

More information

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1 Make a Website A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1 Overview Course outcome: You'll build four simple websites using web

More information

What is jquery?

What is jquery? jquery part 1 What is jquery? jquery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, special functions to interact directly with CSS,

More information

Executive Summary. Performance Report for: The web should be fast. Top 4 Priority Issues

Executive Summary. Performance Report for:   The web should be fast. Top 4 Priority Issues The web should be fast. Executive Summary Performance Report for: https://www.wpspeedupoptimisation.com/ Report generated: Test Server Region: Using: Tue,, 2018, 12:04 PM -0800 London, UK Chrome (Desktop)

More information

jquery Essentials by Marc Grabanski

jquery Essentials by Marc Grabanski jquery Essentials by Marc Grabanski v2 We needed a hero to get these guys in line jquery rescues us by working the same in all browsers! Easier to write jquery than pure JavaScript Hide divs with pure

More information

SEEM4570 System Design and Implementation. Lecture 3 Events

SEEM4570 System Design and Implementation. Lecture 3 Events SEEM4570 System Design and Implementation Lecture 3 Events Preparation Install all necessary software and packages. Follow Tutorial Note 2. Initialize a new project. Follow Lecture Note 2 Page 2. Reset

More information

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application. Extra notes - Client-side Design and Development Dr Nick Hayward HTML - Basics A brief introduction to some of the basics of HTML. Contents Intro element add some metadata define a base address

More information

UI development for the Web.! slides by Anastasia Bezerianos

UI development for the Web.! slides by Anastasia Bezerianos UI development for the Web slides by Anastasia Bezerianos Divide and conquer A webpage relies on three components: Content HTML text, images, animations, videos, etc Presentation CSS how it will appear

More information

jquery Lecture 34 Robb T. Koether Wed, Apr 10, 2013 Hampden-Sydney College Robb T. Koether (Hampden-Sydney College) jquery Wed, Apr 10, / 29

jquery Lecture 34 Robb T. Koether Wed, Apr 10, 2013 Hampden-Sydney College Robb T. Koether (Hampden-Sydney College) jquery Wed, Apr 10, / 29 jquery Lecture 34 Robb T. Koether Hampden-Sydney College Wed, Apr 10, 2013 Robb T. Koether (Hampden-Sydney College) jquery Wed, Apr 10, 2013 1 / 29 1 jquery 2 jquery Selectors 3 jquery Effects 4 jquery

More information

Javascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010

Javascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010 Lecture 22 Javascript Announcements Homework#7 now due 11/24 at noon Reminder: beginning with Homework #7, Javascript assignments must be submitted using a format described in an attachment to HW#7 I will

More information

Programmazione Web a.a. 2017/2018 HTML5

Programmazione Web a.a. 2017/2018 HTML5 Programmazione Web a.a. 2017/2018 HTML5 PhD Ing.Antonino Raucea antonino.raucea@dieei.unict.it 1 Introduzione HTML HTML is the standard markup language for creating Web pages. HTML stands for Hyper Text

More information

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018)

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018) COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018) RAMANA ISUKAPALLI RAMANA@CS.COLUMBIA.EDU 1 LECTURE-1 Course overview See http://www.cs.columbia.edu/~ramana Overview of HTML Formatting, headings,

More information

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model)

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model) INTRO TO CSS RECAP HTML WHAT IS CSS ADDING CSS TO YOUR HTML DOCUMENT CSS IN THE DIRECTORY TREE CSS RULES A FEW CSS VALUES (colour, size and the box model) CSS SELECTORS SPECIFICITY WEEK 1 HTML In Week

More information

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains 2 components

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains 2 components Module 5 JavaScript, AJAX, and jquery Module 5 Contains 2 components Both the Individual and Group portion are due on Monday October 30 th Start early on this module One of the most time consuming modules

More information

Introduction to using HTML to design webpages

Introduction to using HTML to design webpages Introduction to using HTML to design webpages #HTML is the script that web pages are written in. It describes the content and structure of a web page so that a browser is able to interpret and render the

More information

jquery - Other Selectors In jquery the selectors are defined inside the $(" ") jquery wrapper also you have to use single quotes jquery wrapper.

jquery - Other Selectors In jquery the selectors are defined inside the $( ) jquery wrapper also you have to use single quotes jquery wrapper. jquery - Other Selectors In jquery the selectors are defined inside the $(" ") jquery wrapper also you have to use single quotes jquery wrapper. There are different types of jquery selectors available

More information

jquery CS 380: Web Programming

jquery CS 380: Web Programming jquery CS 380: Web Programming What is jquery? jquery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

More information

HTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources

HTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources HTML + CSS ScottyLabs WDW OVERVIEW What are HTML and CSS? How can I use them? WHAT ARE HTML AND CSS? HTML - HyperText Markup Language Specifies webpage content hierarchy Describes rough layout of content

More information

CE212 Web Application Programming Part 2

CE212 Web Application Programming Part 2 CE212 Web Application Programming Part 2 22/01/2018 CE212 Part 2 1 JavaScript Event-Handlers 1 JavaScript may be invoked to handle input events on HTML pages, e.g.

More information

Web Engineering CSS. By Assistant Prof Malik M Ali

Web Engineering CSS. By Assistant Prof Malik M Ali Web Engineering CSS By Assistant Prof Malik M Ali Overview of CSS CSS : Cascading Style Sheet a style is a formatting rule. That rule can be applied to an individual tag element, to all instances of a

More information

Siteforce Pilot: Best Practices

Siteforce Pilot: Best Practices Siteforce Pilot: Best Practices Getting Started with Siteforce Setup your users as Publishers and Contributors. Siteforce has two distinct types of users First, is your Web Publishers. These are the front

More information

B. V. Patel Institute of Business Management, Computer & Information Technology, UTU

B. V. Patel Institute of Business Management, Computer & Information Technology, UTU Bachelor of Computer Application (Sem - 6) 030010602 : Introduction to jquery Question Bank UNIT 1 : Introduction to jquery Short answer questions: 1. List at least four points that how jquery makes tasks

More information

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100 Introduction to Multimedia MMP100 Spring 2016 profehagan@gmail.com thiserichagan.com/mmp100 Troubleshooting Check your tags! Do you have a start AND end tags? Does everything match? Check your syntax!

More information

729G26 Interaction Programming. Lecture 4

729G26 Interaction Programming. Lecture 4 729G26 Interaction Programming Lecture 4 Lecture overview jquery - write less, do more Capturing events using jquery Manipulating the DOM, attributes and content with jquery Animation with jquery Describing

More information

At the Forge Dojo Events and Ajax Reuven M. Lerner Abstract The quality of your Dojo depends upon your connections. Last month, we began looking at Dojo, one of the most popular open-source JavaScript

More information

Executive Summary. Performance Report for: https://edwardtbabinski.us/blogger/social/index. The web should be fast. How does this affect me?

Executive Summary. Performance Report for: https://edwardtbabinski.us/blogger/social/index. The web should be fast. How does this affect me? The web should be fast. Executive Summary Performance Report for: https://edwardtbabinski.us/blogger/social/index Report generated: Test Server Region: Using: Analysis options: Tue,, 2017, 4:21 AM -0400

More information

jquery: JavaScript, Made Easy

jquery: JavaScript, Made Easy jquery: JavaScript, Made Easy 1 What is jquery? jquery is JavaScript. jquery is a Framework, a collec:on of shortcuts jquery is a pla@orm for moderniza:on. jquery is open- source - hdps://github.com/jquery/jquery

More information

First Name Last Name CS-081 March 23, 2010 Midterm Exam

First Name Last Name CS-081 March 23, 2010 Midterm Exam First Name Last Name CS-081 March 23, 2010 Midterm Exam Instructions: For multiple choice questions, circle the letter of the one best choice unless the question explicitly states that it might have multiple

More information

The DOM and jquery functions and selectors. Lesson 3

The DOM and jquery functions and selectors. Lesson 3 The DOM and jquery functions and selectors Lesson 3 Plan for this lesson Introduction to the DOM Code along More about manipulating the DOM JavaScript Frameworks Angular Backbone.js jquery Node.js jquery

More information

NAVIGATION INSTRUCTIONS

NAVIGATION INSTRUCTIONS CLASS :: 13 12.01 2014 NAVIGATION INSTRUCTIONS SIMPLE CSS MENU W/ HOVER EFFECTS :: The Nav Element :: Styling the Nav :: UL, LI, and Anchor Elements :: Styling the UL and LI Elements CSS DROP-DOWN MENU

More information

Introduction to Multimedia. MMP100 Spring 2017 thiserichagan.com/mmp100

Introduction to Multimedia. MMP100 Spring 2017 thiserichagan.com/mmp100 Introduction to Multimedia MMP100 Spring 2017 profehagan@gmail.com thiserichagan.com/mmp100 Troubleshooting Check your tags! Do you have a start AND end tags? Does everything match? Check your syntax!

More information

By Ryan Stevenson. Guidebook #2 HTML

By Ryan Stevenson. Guidebook #2 HTML By Ryan Stevenson Guidebook #2 HTML Table of Contents 1. HTML Terminology & Links 2. HTML Image Tags 3. HTML Lists 4. Text Styling 5. Inline & Block Elements 6. HTML Tables 7. HTML Forms HTML Terminology

More information

Designing the Home Page and Creating Additional Pages

Designing the Home Page and Creating Additional Pages Designing the Home Page and Creating Additional Pages Creating a Webpage Template In Notepad++, create a basic HTML webpage with html documentation, head, title, and body starting and ending tags. From

More information

footer, header, nav, section. search. ! Better Accessibility.! Cleaner Code. ! Smarter Storage.! Better Interactions.

footer, header, nav, section. search. ! Better Accessibility.! Cleaner Code. ! Smarter Storage.! Better Interactions. By Sruthi!!!! HTML5 was designed to replace both HTML 4, XHTML, and the HTML DOM Level 2. It was specially designed to deliver rich content without the need for additional plugins. The current version

More information

CS197WP. Intro to Web Programming. Nicolas Scarrci - February 13, 2017

CS197WP. Intro to Web Programming. Nicolas Scarrci - February 13, 2017 CS197WP Intro to Web Programming Nicolas Scarrci - February 13, 2017 Additive Styles li { color: red; }.important { font-size: 2em; } first Item Second

More information

ADVANCED JAVASCRIPT. #7

ADVANCED JAVASCRIPT. #7 ADVANCED JAVASCRIPT. #7 7.1 Review JS 3 A simple javascript functions is alert(). It's a good way to test a script is working. It brings up a browser default popup alert window. alert(5); 4 There are 2

More information

a Very Short Introduction to AngularJS

a Very Short Introduction to AngularJS a Very Short Introduction to AngularJS Lecture 11 CGS 3066 Fall 2016 November 8, 2016 Frameworks Advanced JavaScript programming (especially the complex handling of browser differences), can often be very

More information

UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? editor editor Q.2: What do you understand by a web browser?

UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? editor editor Q.2: What do you understand by a web browser? UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? A 1: A text editor is a program that helps you write plain text (without any formatting) and save it to a file. A good example is

More information

ITS331 Information Technology I Laboratory

ITS331 Information Technology I Laboratory ITS331 Information Technology I Laboratory Laboratory #11 Javascript and JQuery Javascript Javascript is a scripting language implemented as a part of most major web browsers. It directly runs on the client's

More information

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments. Web Development WEB101: Web Development Fundamentals using HTML, CSS and JavaScript $2,495.00 5 Days Replay Class Recordings included with this course Upcoming Dates Course Description This 5-day instructor-led

More information

Css Manually Highlight Current Link Nav Link

Css Manually Highlight Current Link Nav Link Css Manually Highlight Current Link Nav Link way to automatically highlight the "current" link. And I can manually add the following CSS to each page to get them highlighted, but I want to avoid added.

More information

UI Course HTML: (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) Introduction. The World Wide Web (WWW) and history of HTML

UI Course HTML: (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) Introduction. The World Wide Web (WWW) and history of HTML UI Course (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) HTML: Introduction The World Wide Web (WWW) and history of HTML Hypertext and Hypertext Markup Language Why HTML Prerequisites Objective

More information

B. V. Patel Institute of Business Management, Computer & Information Technology, UTU 2014

B. V. Patel Institute of Business Management, Computer & Information Technology, UTU 2014 B.C.A. (6 th Semester) 030010602 Introduction To jquery Question Bank UNIT: Introduction to jquery Long answer questions 1. Write down steps for installing and testing jquery using suitable example. 2.

More information

Downloads: Google Chrome Browser (Free) - Adobe Brackets (Free) -

Downloads: Google Chrome Browser (Free) -   Adobe Brackets (Free) - Week One Tools The Basics: Windows - Notepad Mac - Text Edit Downloads: Google Chrome Browser (Free) - www.google.com/chrome/ Adobe Brackets (Free) - www.brackets.io Our work over the next 6 weeks will

More information

Building Your Website

Building Your Website Building Your Website HTML & CSS This guide is primarily aimed at people building their first web site and those who have tried in the past but struggled with some of the technical terms and processes.

More information

Uniform Resource Locators (URL)

Uniform Resource Locators (URL) The World Wide Web Web Web site consists of simply of pages of text and images A web pages are render by a web browser Retrieving a webpage online: Client open a web browser on the local machine The web

More information

Data Visualization (CIS/DSC 468)

Data Visualization (CIS/DSC 468) Data Visualization (CIS/DSC 468) Web Programming Dr. David Koop Definition of Visualization Computer-based visualization systems provide visual representations of datasets designed to help people carry

More information

JAVASCRIPT - CREATING A TOC

JAVASCRIPT - CREATING A TOC JAVASCRIPT - CREATING A TOC Problem specification - Adding a Table of Contents. The aim is to be able to show a complete novice to HTML, how to add a Table of Contents (TOC) to a page inside a pair of

More information

Using Development Tools to Examine Webpages

Using Development Tools to Examine Webpages Chapter 9 Using Development Tools to Examine Webpages Skills you will learn: For this tutorial, we will use the developer tools in Firefox. However, these are quite similar to the developer tools found

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. jquery

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. jquery i About the Tutorial jquery is a fast and concise JavaScript library created by John Resig in 2006. jquery simplifies HTML document traversing, event handling, animating, and Ajax interactions for Rapid

More information

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains an Individual and Group component

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains an Individual and Group component Module 5 JavaScript, AJAX, and jquery Module 5 Contains an Individual and Group component Both are due on Wednesday October 24 th Start early on this module One of the most time consuming modules in the

More information

Using Dreamweaver CS6

Using Dreamweaver CS6 Using Dreamweaver CS6 7 Dynamic HTML Dynamic HTML (DHTML) is a term that refers to website that use a combination of HTML, scripting such as JavaScript, CSS and the Document Object Model (DOM). HTML and

More information

Create web pages in HTML with a text editor, following the rules of XHTML syntax and using appropriate HTML tags Create a web page that includes

Create web pages in HTML with a text editor, following the rules of XHTML syntax and using appropriate HTML tags Create a web page that includes CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB By Hassan S. Shavarani UNIT2: MARKUP AND HTML 1 IN THIS UNIT YOU WILL LEARN THE FOLLOWING Create web pages in HTML with a text editor, following

More information

PHP Online Training. PHP Online TrainingCourse Duration - 45 Days. Call us: HTML

PHP Online Training. PHP Online TrainingCourse Duration - 45 Days.  Call us: HTML PHP Online Training PHP is a server-side scripting language designed for web development but also used as a generalpurpose programming language. PHP is now installed on more than 244 million websites and

More information

The default style for an unordered (bulleted) list is the bullet, or dot. You can change the style to either a square or a circle as follows:

The default style for an unordered (bulleted) list is the bullet, or dot. You can change the style to either a square or a circle as follows: CSS Tutorial Part 2: Lists: The default style for an unordered (bulleted) list is the bullet, or dot. You can change the style to either a square or a circle as follows: ul { list-style-type: circle; or

More information

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 8 Professional Program: Data Administration and Management JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) AGENDA

More information

Web Development & Design Foundations with HTML5, 8 th Edition Instructor Materials Chapter 14 Test Bank

Web Development & Design Foundations with HTML5, 8 th Edition Instructor Materials Chapter 14 Test Bank Multiple Choice. Choose the best answer. 1. JavaScript can be described as: a. an object-oriented scripting language b. an easy form of Java c. a language created by Microsoft 2. Select the true statement

More information

Frontend guide. Everything you need to know about HTML, CSS, JavaScript and DOM. Dejan V Čančarević

Frontend guide. Everything you need to know about HTML, CSS, JavaScript and DOM. Dejan V Čančarević Frontend guide Everything you need to know about HTML, CSS, JavaScript and DOM Dejan V Čančarević Today frontend is treated as a separate part of Web development and therefore frontend developer jobs are

More information

BIM222 Internet Programming

BIM222 Internet Programming BIM222 Internet Programming Week 7 Cascading Style Sheets (CSS) Adding Style to your Pages Part II March 20, 2018 Review: What is CSS? CSS stands for Cascading Style Sheets CSS describes how HTML elements

More information

6. Accelerated Development with jquery Library and AJAX Technology

6. Accelerated Development with jquery Library and AJAX Technology Web Engineering I BIT Pre-Semester Accelerated Development with jquery Library and AJAX Technology (Modal Question) Lessons for Mid-Exam 1. Web Administration skills in Analysis, Design, Develop and Deploy

More information

Wakanda Architecture. Wakanda is made up of three main components: Wakanda Server Wakanda Studio Wakanda Client Framework

Wakanda Architecture. Wakanda is made up of three main components: Wakanda Server Wakanda Studio Wakanda Client Framework Wakanda Architecture Wakanda is made up of three main components: Wakanda Server Wakanda Studio Wakanda Client Framework Note: For a more general overview of Wakanda, please see What is Wakanda?) Wakanda

More information

BEFORE CLASS. If you haven t already installed the Firebug extension for Firefox, download it now from

BEFORE CLASS. If you haven t already installed the Firebug extension for Firefox, download it now from BEFORE CLASS If you haven t already installed the Firebug extension for Firefox, download it now from http://getfirebug.com. If you don t already have the Firebug extension for Firefox, Safari, or Google

More information

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web HTML & CSS SWE 432, Fall 2017 Design and Implementation of Software for the Web HTML: HyperText Markup Language LaToza Language for describing structure of a document Denotes hierarchy of elements What

More information

ADVANCED JAVASCRIPT #8

ADVANCED JAVASCRIPT #8 ADVANCED JAVASCRIPT #8 8.1 Review JS 3 A conditional statement can compare two values. Here we check if one variable we declared is greater than another. It is true so the code executes. var cups = 15;

More information

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery. HTML5/CSS3/JavaScript Programming Course Summary Description This class is designed for students that have experience with basic HTML concepts that wish to learn about HTML Version 5, Cascading Style Sheets

More information

Jquery Manually Set Checkbox Checked Or Not

Jquery Manually Set Checkbox Checked Or Not Jquery Manually Set Checkbox Checked Or Not Working Second Time jquery code to set checkbox element to checked not working. Apr 09 I forced a loop to show checked state after the second menu item in the

More information

HTML and CSS COURSE SYLLABUS

HTML and CSS COURSE SYLLABUS HTML and CSS COURSE SYLLABUS Overview: HTML and CSS go hand in hand for developing flexible, attractively and user friendly websites. HTML (Hyper Text Markup Language) is used to show content on the page

More information

Lecture : 3. Practical : 2. Course Credit. Tutorial : 0. Total : 5. Course Learning Outcomes

Lecture : 3. Practical : 2. Course Credit. Tutorial : 0. Total : 5. Course Learning Outcomes Course Title Course Code WEB DESIGNING TECHNOLOGIES DCE311 Lecture : 3 Course Credit Practical : Tutorial : 0 Total : 5 Course Learning Outcomes At end of the course, students will be able to: Understand

More information