jquery JavaScript Made Easy



Similar documents
jquery Tutorial for Beginners: Nothing But the Goods

The purpose of jquery is to make it much easier to use JavaScript on your website.

Web Development CSE2WD Final Examination June (a) Which organisation is primarily responsible for HTML, CSS and DOM standards?

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK

Overview. In the beginning. Issues with Client Side Scripting What is JavaScript? Syntax and the Document Object Model Moving forward with JavaScript

Client-side Web Engineering From HTML to AJAX

MASTERTAG DEVELOPER GUIDE

«W3Schools Home Next Chapter» JavaScript is THE scripting language of the Web.

Finding XSS in Real World

JavaScript and Dreamweaver Examples

Project 2: Web Security Pitfalls

Intell-a-Keeper Reporting System Technical Programming Guide. Tracking your Bookings without going Nuts!

Technical University of Sofia Faculty of Computer Systems and Control. Web Programming. Lecture 4 JavaScript

Website Login Integration

Script Handbook for Interactive Scientific Website Building

IMRG Peermap API Documentation V 5.0

Dynamic Web-Enabled Data Collection

Website Implementation

c. Write a JavaScript statement to print out as an alert box the value of the third Radio button (whether or not selected) in the second form.

ANGULAR JS SOFTWARE ENGINEERING FOR WEB SERVICES HASAN FAIZAL K APRIL,2014

the intro for RPG programmers Making mobile app development easier... of KrengelTech by Aaron Bartell

Introduction to PhoneGap

PLAYER DEVELOPER GUIDE

Web Development 1 A4 Project Description Web Architecture

CMSC434 TUTORIAL #3 HTML CSS JavaScript Jquery Ajax + Google AppEngine Mobile WebApp HTML5

BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS COPYRIGHT 2013 TERRY ANN MORRIS, ED.D

Slide.Show Quick Start Guide

Introduction to Tizen SDK Alpha. Taiho Choi Samsung Electronics

Example. Represent this as XML

Setup The package simply needs to be installed and configured for the desired CDN s distribution server.

HTML TIPS FOR DESIGNING

A Tale of the Weaknesses of Current Client-Side XSS Filtering

JQUERY - EFFECTS. Showing and Hiding elements. Syntax. Example

Visualizing an OrientDB Graph Database with KeyLines

Dashboard Skin Tutorial. For ETS2 HTML5 Mobile Dashboard v3.0.2

So we're set? Have your text-editor ready. Be sure you use NotePad, NOT Word or even WordPad. Great, let's get going.

Chapter 11 How to create and use plugins

Yandex.Widgets Quick start

Embedding tracking code into IAS

AJAX The Future of Web Development?

Outline. 1.! Development Platforms for Multimedia Programming!

2- Forms and JavaScript Course: Developing web- based applica<ons

Fortigate SSL VPN 3.x With PINsafe Installation Notes

JavaScript Basics & HTML DOM. Sang Shin Java Technology Architect Sun Microsystems, Inc. sang.shin@sun.com

Cross Site Scripting (XSS) and PHP Security. Anthony Ferrara NYPHP and OWASP Security Series June 30, 2011

InPost UK Limited GeoWidget Integration Guide Version 1.1

Sitecore Dashboard User Guide

AJAX with jquery. ACM Webmonkeys 2011

Version 1.0 OFFICIAL THEME USER GUIDE. reva. HTML5 - Responsive One Page Parallax Theme

Making Web Application using Tizen Web UI Framework. Koeun Choi

Chapter 2 HTML Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

Visualizing a Neo4j Graph Database with KeyLines

A set-up guide and general information to help you get the most out of your new theme.

This matches a date in the MM/DD/YYYY format in the years The date must include leading zeros.

Developing Offline Web Application

WebIOPi. Installation Walk-through Macros

CarTrawler AJAX Booking Engine Version: 5.10 Date: 01/10/13.

Drupal CMS for marketing sites

Citrix StoreFront. Customizing the Receiver for Web User Interface Citrix. All rights reserved.

Getting Started Guide

Subject Tool Remarks What is JQuery. Slide Javascript Library

Tutorial JavaScript: Switching panels using a radio button

Single Page Web App Generator (SPWAG)

Portals and Hosted Files

Fortigate SSL VPN 4 With PINsafe Installation Notes

Responsive Web Design Creative License

Intro to jquery. Web Systems 02/17/2012

Advanced BEx Web Application Designer Concepts. Prakash Darji NetWeaver RIG

Login with Amazon. Getting Started Guide for Websites. Version 1.0

Spectrum Technology Platform

<script type="text/javascript"> var _gaq = _gaq []; _gaq.push(['_setaccount', 'UA ']); _gaq.push(['_trackpageview']);

Tutorial: Building a Dojo Application using IBM Rational Application Developer Loan Payment Calculator

jquery Programming Cookbook jquery Programming Cookbook

Version 1.3 OFFICIAL THEME USER GUIDE. Renova. Unique Creative Portfolio - Responsive HTML5

Implementing Specialized Data Capture Applications with InVision Development Tools (Part 2)

JavaFX Mashups. Martin Gunnarsson, Pär Sikö, Jayway. fredag 26 oktober 12

What about MongoDB? can req.body.input 0; var date = new Date(); do {curdate = new Date();} while(curdate-date<10000)

JAVASCRIPT, TESTING, AND DRUPAL

CIS 467/602-01: Data Visualization

Going Beyond SAP ITS Mobile Apps to a Responsive Design Mobile Apps. JK (JayaKumar Pedapudi) Principal Consultant NTT DATA, Inc.

Table of Contents. Overview Supported Platforms Demos/Downloads Known Issues Note Included Files...

Version 4.0. Unit 3: Web Design. Computer Science Equity Alliance, Exploring Computer Science Unit 3: Web Design 102

Instant Chime for IBM Sametime Installation Guide for Apache Tomcat and Microsoft SQL

Transcription:

jquery JavaScript Made Easy

jquery in the Wild Bank of America Intuit Google NBC Slashdot Sourceforge Warner Bros. Records Newsweek Trac mozdev Drupal PEAR Zend Framework WordPress SPIP Symfony

jquery Benefits From beginner to advanced At its core, a simple concept Unobtrusive from the ground up Small file size(s) Easy Plugin API Excellent documentaron Thriving, Smart, Helpful Community

Find Something, Do Something $( tbody tr:nth child(even) ).addclass( alt );

Unobtrusive Behavior Content Presentation jquery.js index.html style.css custom.js

Designerly Syntax CSS p { }.menu { } #content { } jquery $( p ) $(.menu ) $( #content )

Designerly Syntax CSS a[rel=nofollow] #content > p { } tr:nth child(even) { } jquery $( a[rel=nofollow] ) $( #content > p ) $( tr:nth child(even) )

Example Get the height of the viewport

DOM ScripRng var x,y; if (self.innerheight) { // all except Explorer x = self.innerwidth; y = self.innerheight; } else if (document.documentelement && document.documentelement.clientheight) { // Explorer 6 Strict Mode x = document.documentelement.clientwidth; y = document.documentelement.clientheight; } else if (document.body) { // other Explorers x = document.body.clientwidth; y = document.body.clientheight; }

var x = $(window).width(); var y = $(window).height(); jquery

Example Find a blockquote with a cite adribute <blockquote cite= hdp://cnn.com > Create a link to the URL of the cite adribute <a href= hdp://cnn.com >source</a> Place the link in a new paragraph at the end of the blockquote.

DOM ScripRng if (!document.getelementsbytagname) return false; var quotes = document.getelementsbytagname("blockquote"); for (var i=0; i<quotes.length; i++) { var source = quotes[i].getattribute("cite"); if (source) { var link = document.createelement("a"); link.setattribute("href",source); var text = document.createtextnode("source"); link.appendchild(text); var para = document.createelement("p"); para.classname = "attribution"; para.appendchild(link); quotes[i].appendchild(para); } }

jquery $('blockquote[cite]').each(function() { $('<p class="attribution"></p>').append('<a href="' + $(this).attr('cite') + '">source</a>').appendto($(this)); });

Gekng Started Referencing Scripts in HTML Document Ready

Referencing Scripts in the <head> Typical setup jquery file goes first <head> <!-- stuff --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js" type="text/javascript"></script> <script src="custom.js" type="text/javascript"></script> <!-- more stuff --> </head>

Document Ready Binds a funcron to be executed as soon as the DOM has been successfully loaded... Before images load A.er stylesheets load (for now) Usually beder than window.onload

Document Ready: Code $(document).ready(function() { }); // Stuff to do as soon as the DOM is ready;

Document Ready: VarieRes $(document).ready(function() {/* */}); $().ready(function() {/* */}); $(function() {/* */}); jquery(function($) {/* /*});

Document Ready: MulRple document ready funcrons are fine. Scope may be an issue. $(document).ready(function() { var mood = happy ; }); $(document).ready(function() { try { alert(mood); // no alert } catch(err) { alert(err); // "ReferenceError: mood is not }); defined" }

Document Ready: MulRple document ready funcrons are fine. Scope may be an issue. $(document).ready(function() { var $.mood = happy ; }); $(document).ready(function() { try { alert($.mood); // "happy" } catch(err) { alert(err); // no alert } });

Document Ready: When <script> is inside <body> (somermes) <body> <!-- more stuff --> <script src="jquery.js" type="text/javascript"></script> <script type="text/javascript"> // no document ready here </script> </body>

Document Ready When Not to Use When images need to be loaded first $(window).bind('load', function() { // do something with images }

DocumentaRon Official DocumentaRon API: docs.jquery.com FAQ Tutorials Tutorial Sites Books Learning jquery jquery in AcRon more in the works learningjquery.com jqueryminute.com jqueryfordesigners.com many more!

The Community jquery evangelism Google Groups jquery en jquery dev jquery ui planet.jquery.com IRC freenode.net #jquery Twider @jquery, @jquery ui