School of Business Administration

Slides:



Advertisements
Similar presentations
JavaScript – Quiz #8 Lecture Code:
Advertisements

JQuery A Javascript Library Hard things made eas(ier) Norman White.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
CIS101 Introduction to Computing Week 06. Agenda Your questions Resume project HTML Project Two This week online Next class.
© Anselm SpoerriInfo + Web Tech Course Information Technologies Info + Web Tech Course Anselm Spoerri PhD (MIT) Rutgers University
CIS101 Introduction to Computing HTML Project Two.
CIS101 Introduction to Computing Week 06. Agenda Your questions Resume project HTML Project Two This week online Next class.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
Philly.NET Hands-On jQuery + Plug-ins Bill Wolff, Rob Keiser.
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
PhpXperts What is jQuery Javascript Library Fast and concise Simplifies the interaction between HTML and JavaScript.
INFSCI  Last time we built a doggie web page in class following the instructions in the slide deck: Build Web Page with HTML – see week 3 The topics.
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
HTML: Hyptertext Markup Language Doman’s Sections.
Animation & Effects Using JQuery. What is jQuery? jQuery is a lightweight, JavaScript library. The purpose of jQuery is to make it much easier to use.
Build Your Own Website Review of week 3 Editing your header Editing your header Creating and navigating to hidden pages Creating and navigating to hidden.
IT Introduction to Website Development Welcome!
JQuery Introduction © Copyright 2014, Fred McClurg All Rights Reserved.
HTML GUIDE Press F5 and then Click on the links on the left to get to the section you want Section 1: Getting Started Section 2: Moving Banner Section.
Web Design (8) Images (2). My Holiday Photos An exercise in adding and linking images. Create a new website folder calling it ‘My Holiday Photos’. In.
Week 2: Building a Simple Website IMC 320 Web Publishing Spring 2011.
Miguel Lara, PhD. 1:10 – 1:15 Pre-test 1:15 – 1:30 Course overview 1:30 – 2:00 Setting up DW Site 2:00 – 2:05 > 2:05 – 2:55 Hands-on Lecture 2:55 – 3:00.
WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Variables, Functions and Events (NON-Audio version) © Dr. David C. Gibbs WDMD.
IS2802 Introduction to Multimedia Applications for Business Lecture 07: Introduction to jQuery Rob Gleasure
Positioning Objects with CSS and Tables
Introduction to JQuery COGS 187A – Fall JQuery jQuery is a JavaScript library, and allows us to manipulate HTML and CSS after the page has been.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
Web Programming Java Script-Introduction. What is Javascript? JavaScript is a scripting language using for the Web. JavaScript is a programming language.
COM621: Advanced Interactive Web Development Lecture 6 – JavaScript (cont.)
Miguel Lara, PhD. Design and development instructional websites using a variety of web technologies such as HTML5, CSS, JavaScript, and jQuery.
JQuery Element & Attribute Selectors, Events, HTML Manipulation, & CSS Manipulation.
DHTML.
Objective % Select and utilize tools to design and develop websites.
Using DHTML to Enhance Web Pages
12/04/12 JQuery I took these slides from the site because they were pretty good looking. Instructions for editing school and department titles: Select.
Tek Raj Chhetri Code for Humans not for machine.
IST541 Interactive Media Miguel Lara, PhD.
Parts of Chapter 14 Key Concepts
Human Computer Interaction
Coding, Testing and Valdating a Web Page
Bare bones notes.
Intro to JavaScript CS 1150 Spring 2017.
Introduction to Web programming
Web Development & Design Foundations with HTML5 7th Edition
Objectives Overview Discuss tools for creating a website, such as text editors, code editors, and content management systems, and when to use each Explain.
Objective % Select and utilize tools to design and develop websites.
School of Business Administration
Web Development & Design Foundations with HTML5 7th Edition
The Web Wizard’s Guide To DHTML and CSS
DHTML Javascript Internet Technology.
Web Programming A different world! Three main languages/tools No Java
JQuery with ASP.NET.
Basic HTML and Embed Codes
DHTML Javascript Internet Technology.
Web Development & Design Foundations with H T M L 5
Web Programming Language
Intro to Web Development Links
Some Stuff You Need to Know
Javascript and JQuery SRM DSC.
E-commerce Applications Development
HTML & CSS 7 Languages in 7 Days.
Session 3: Basic CSS Spring 2009
5.00 Apply procedures to organize content by using Dreamweaver. (22%)
HTML Tags and Structure
Web Programming and Design
Introduction to Styling
4.00 Apply procedures to add content by using Dreamweaver. (22%)
Presentation transcript:

School of Business Administration Advanced Web Development IT125 Spring Term 2017 Marymount University School of Business Administration Professor Suydam Week 14 JavaScript (Chapters 14)

Agenda Week 14 MP4 Grading Comments MP5 Instruction Completion JavaScript Final Project Preparation Quiz 5

Course Schedule

MP5 Setup

MP5 Setup new new new Chapter 12 Student Files freshstart12

MP5 Chapter 12 .clearleft { margin: 1em; clear: left; } Task 1: Setup javajam12 directory (folder). Copy the javamug.jpg, javashirt.jpg, and herocouch.jpg images from the chapter 12 folder in the student files and save them to your javajam12 images folder. Task 2: Update the Navigation on Each Page. Add a new list item and hyperlink in the main navigation area that displays the text “Gear” and links to the file gear.html. See Figure 12.6 for an example of the navigation area. Save the file. Task 3: Configure the CSS (place after table instructions of css). Add a new style rule to configure a class named clearleft that has a 1em margin and will clear a left float. Configure a new id named #herocouch with 250px height that displays the hero-couch.jpg image in 100% of the background. Use the #heroguitar id as a guide as you code the styles. (place after #heroguitar) Task 4: Create the New Gear Page. One way to be productive is to create pages based on your earlier work. Use the Music page (music.html) as a starter Save the file as gear.html. This will give you a head start and ensure that the pages on the website are similar. Perform the following modifications: a. Change the page title to an appropriate phrase. b. Assign the div to an id named herocouch. c. Change the text within the h2 element to “JavaJam Gear”. d. Delete the contents and HTML elements within the main element that are below the h2 element. e. Place each sentence below in a separate paragraph: JavaJam gear not only looks good, it’s good to your wallet, too. Get a 10% discount when you wear a JavaJam shirt or bring in your JavaJam mug! f. Configure an image element to display the javashirt.jpg graphic. Assign the image to the floatleft class. g. Configure the following text in a paragraph: “JavaJam shirts are comfortable to wear to school and around town. 100% cotton. XL only. $14.95” h. Code a line break tag below the paragraph. Assign the line break tag to the clearleft class. i. Configure an image element to display the javamug.jpg graphic. Assign the image to the floatleft class. j. Configure the following text in a paragraph: “JavaJam mugs carry a full load of caffeine (12 oz.) to jump-start your morning. $9.95”. .clearleft { margin: 1em; clear: left; } #herocouch { background-image: url(../images/herocouch.jpg); background-size: 100% 100%; height: 250px; }

MP5 Chapter 12 <form method="post" action="http://www.webdevfoundations.net/scripts/cart.asp"> <input type="hidden" name="desc1" id="desc1" value="JavaJam Shirt"> <input type="hidden" name="cost1" id="cost1" value="14.95"> <input type="submit" value="Add to Cart"> </form> <form method="post" action="http://www.webdevfoundations.net/scripts/cart.asp"> <input type="hidden" name="desc2" id="desc2" value="JavaJam Mug"> <input type="hidden" name="cost2" id="cost2" value="9.95"> <input type="submit" value="Add to Cart"> </form>

MP5 Chapter 13 Tasks (3) Chapter 13 Tasks -- Use javajam12 as your starting point -- copy and paste javajam12 contents into the mp5 "javajam13" folder (done in class).   * Add meta tags with description and comments to all pages (Chapter 13, Task 3) (5%) <meta name="description" content="Visit JavaJam CoffeeHouse for a relaxing cup of specialty coffee or tea, delicious snacks, and great conversation. Weekly poetry readings and performances by local and regional musicians."> * Setup a Google Analytics account and create and place code for home page tracking (index.html only) (Chapter 13, new task) (10%) * Setup Inline frame for video on index.html page only replacing all the instructions between <div>...</div> tags with You Tube video located during class. (Chapter13, new task) (10%)

MP5 Chapter 13 Google Analytics Google: Google Analytics Create an account using your marymount.edu email address Sign in: https://www.google.com/analytics/web/provision/?authuser=0#provision/SignUp/

MP5 Chapter 13 Google Analytics Simple name (e.g., “it125Demo” https://tagmanager.google.com/?authuser=0#/admin/accounts/create URL to your it125 site

MP5 Chapter 13 Web Promotion QR (Quick Response) Code (Google: Create your QR code for free”) Save in images folder

MP5 Chapter 13 Inline Frame <iframe> Google: “You Tube javajam” Select the option for: JavaJam Chapter 6 Case Study Overview – YouTube Get embed code (Share>Embed) and insert in code view of javajam13 index.html page.

MP5 Chapter 14 DOM Review (page 578 text)

MP5 Chapter 14 JavaScript Hands-On Practice 14.1 Alert 14.2 Write() method 14.3 Mouseover event handlers 14.4 Writing Variable 14.5 Prompt() method 14.6 Prompt message 14.8 Form

What is jQuery? jQuery is a free open-source JavaScript Library Provides interaction and dynamic effects on web pages Common Uses Dynamically manipulate the CSS properties of elements Detect and react to events – such as mouse movements Animate elements on a web page – such as image slideshows And much more... Resources http://jquery.com http://jquery.org Adding a JQuery to a Webpage (2 Options) Download jQuery http://jquery.com/download Access jQuery via a CDN <script src= "http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"> </script>

jQuery The ready event - Triggered when the browser has loaded the Document Object Model(DOM) for the web page $(document).ready(function() { Your JavaScript statements and other jQuery statements go here }) Display an Alert When the page loads <script> alert("Ready for jQuery"); </script>

jQuery Selectors A selector indicates which DOM elements jQuery will affect http://api.jquery.com/category/selectors Some commonly used jQuery selectors Selector Purpose $('*') wildcard – selects all elements $('li') HTML element selector – selects all li elements $('.myclass') Class selector – selects all elements assigned to the class named myclass $('#myid') Id selector – selects the element assigned to the id named myid $('nav a') HTML element selector – selects all anchor elements contained within the nav element $('#resources a') Id selector and HTML element selector – selects all anchor elements contained within the id named resources $('li:first') Positional selector that selects the first element of that type on the page $('li:odd') Positional selector- selects every other li element on the page

jQuery Methods A method acts upon the DOM elements you have selected http://api.jquery.com Some commonly used jQuery methods Method Purpose click() Binds a jQuery event handler to the JavaScript click event css() Sets the specified CSS property for the selected element(s fadeToggle() Displays or hides the selected element(s) by animating their opacity hover() Binds a jQuery event handler to the JavaScript onmouseover event slideToggle() Displays or hides the selected element(s) with a sliding motion toggle() Displays or hides the selected element(s) attr() Gets or sets attributes for the selected element(s) html() Gets or sets HTML contents for the selected element(s)

MP5 Chapter 14 JQuery Hands-On Practice 14.9 jQuery Ready 14.10 fade toggle slide toggle toggle 14.13 jQuery Validation Plug-in

jQuery Image Gallery photos <!DOCTYPE html> <html lang="en"> <head> <title>Slideshow</title> <meta charset="utf-8"> <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> <link href="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.css" rel="stylesheet"> <script src="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.js"></script> </head> <body> <h1>Slideshow</h1> <div class="fotorama" data-autoplay="true"> <img src="photo1.jpg" data-caption="Golden Gate Bridge" alt="Golden Gate Bridge"> <img src="photo2.jpg" data-caption="Rocky Coastline" alt="Rocky Coastline"> <img src="photo3.jpg" data-caption="Clouds on the Coast" alt="Clouds on the Coast"> <img src="photo4.jpg" data-caption="Waterfall Near Big Sur" alt="Waterfall Near Big Sur"> <img src="photo5.jpg" data-caption="Waves Crashing on the Coast" alt="Waves Crashing on the Coast"> <img src="photo6.jpg" data-caption="Sunset on the Coast" alt="Sunset on the Coast"> </div> </body> </html> photos

MP5 Chapter 14

MP5 Chapter 14 javajam14 14.2.1 JavaScript (index.html) <div> <script> document.write("This page was last modified on: " + document.lastModified) </script> </div> 14.2.2 JQuery (index.html) <div></div> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script> $(document).ready(function(){ $('footer div').html('This page was last modified on: '+ document.lastModified); }); </script> 14.3.1 JavaScript (music.html) <a href="#" onmouseover="alert('Concerts sell out quickly so act fast!');"> 14.3.2 JQuery (music.html) <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script> $(document).ready(function(){ $('main a').hover(function(){ alert("Concerts sell out quickly so act fast!"); }); </script> <script> $(document).ready(function() { $('#more').click(function(){ $('#details').toggle(); }); </script>

MP5 Chapter 14 javajam14 14.2.1 JavaScript (index.html) 14.3.1 JavaScript (music.html) 14.2.2 JQuery (index.html) 14.3.2 JQuery (music.html)

Final Project Preparation