JQuery Introduction © Copyright 2014, Fred McClurg All Rights Reserved.

Slides:



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

The jQuery library. What is jQuery ? A javascript lightweight library Is very easy to use Is powerful Is cross-browser compatible Downloadable from jQuery.com,
The DOM tree CS The DOM tree CS380 2 Types of DOM nodes  element nodes (HTML tag)  can have children and/or attributes  text nodes (text in.
Cascading Style Sheets
Programming Club IIT Kanpur. Work environment Before you begin coding,always set up your work environment to your needs IDE Notepad++ Sublime Text 2.
CT-376 jQuery Most popular javascript library today Latest version:
The Document Object Model (DOM) 1 JavaScript is an object-based language—that is, it’s based on manipulating objects by changing each object’s properties.
SE-2840 Dr. Mark L. Hornick1 jQuery. jQuery is a library of JavaScript functions Helps minimize the amount of JavaScript you have to write in order to:
Page Elements © Copyright 2014, Fred McClurg All Rights Reserved.
JQuery A Javascript Library Hard things made eas(ier) Norman White.
XP Introducing Cascading Style Sheets With Cascading Style Sheets (CSS), you can create one or more documents that control the appearance of some or all.
Cascading Style Sheets Controlling the Display Of Web Content.
JQuery. What is jQuery? jQuery is a fast, small, and feature-rich JavaScript library that simplifies HTML document traversing and manipulation event handling.
Philly.NET Hands-On jQuery + Plug-ins Bill Wolff, Rob Keiser.
Definition from Wikipedia.  The Prototype JavaScript Framework  implemented as a single file of JavaScript code  named prototype.js (
JQuery CS 268. What is jQuery? From their web site:
PhpXperts What is jQuery Javascript Library Fast and concise Simplifies the interaction between HTML and JavaScript.
CSDM 2N15 CHRIS K KIM WEEK 1 CONTINUING STUDIES OCAD UNIVERSITY Advanced Web Art and Design, CSS and JavaScript Frameworks.
JQuery March 09 th,2009 Create by
Today’s objectives  Complete web page  Using xhtml & CSS  Adding CSS to documents Embed url(File);  CSS.
JQuery 10/21. Today jQuery Some cool tools around the web JavaScript Libraries Drawing libraries HTML Frameworks Conventions.
Today’s objectives  Presentational | Inline | Block | Validate  CSS | Rules | Declarations.
JQUERY | INTRODUCTION. jQuery  Open source JavaScript library  Simplifies the interactions between  HTML document, or the Document Object Model (DOM),
Title, meta, link, script.  The title looks like:  The tag defines the title of the document in the browser toolbar.  It also: ◦ Provides a title for.
13. jQuery See the official documentation at  See the terse API documentation at
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
JavaScript, Fourth Edition
MySQL and PHP Review CSS. Cascading Style Sheet (CSS) Style sheets are files or forms that describe the layout and appearance of a document. Cascading.
INTRODUCTION TO HTML5 Using jQuery with HTML5. Introducing jQuery  Although it is not a part of any W3C or WHATWG specification, jQuery performs an important.
CSS Cascading Style Sheets. CSS Advantages Greater typography and page layout control Style is separate from structure Styles can be stored in a separate.
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.
JQuery Youn-Hee Han
. Taught by: Muhammad Ali Baloch midahot. WHAT IS JQUERY JQuery is a fast, small, and feature-rich JavaScript library. Simplifies the interaction between.
CHAPTER 5 jQuery อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Unleash the Power of jQuery Doncho Minkov Telerik Software Academy academy.telerik.com Senior Technical Trainer
LOGO sparcs.org 1 jQuery Tutorial Presenter ㅎㅇㅎㅇ.
Event Handling © Copyright 2014, Fred McClurg All Rights Reserved.
JavaScript Library. What is jQuery jQuery is a lightweight JavaScript library. The purpose is to make it easier to use JavaScript code on your website.
Unleash the Power of jQuery Learning & Development Team Telerik Software Academy.
Welcome to jQuery jQuery is one of many available libraries that – Provide functions for manipulating the web page With fairly good performance – Help.
Intro to jQuery. What is jQuery? A JavaScript library Lightweight (about 31KB for the minified version) Simplifies HTML document traversing (DOM), event.
Unit 13 –JQuery Basics Instructor: Brent Presley.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
Introduction to jQuery. 2 Objectives When you complete this chapter, you will be able to: Select elements using jQuery syntax Use built-in jQuery functions.
How to… Cascading Style Sheets. How to Insert a Style Sheet When a browser reads a style sheet, it will format the document according to it. There are.
Understanding JavaScript and Coding Essentials Lesson 8.
SHAREPOINT & JQUERY. Hi, my name and I am a product manager at lightning tools. I have been working with SharePoint for 5 years.
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.
05 | Integrating JavaScript and MVC 4 Jon Galloway | Tech Evangelist Christopher Harrison | Head Geek.
JQuery “write less, do more”. jQuery - Introduction Simply a JavaScript library to simplify JavaScript programming itself Wraps long standard JavaScript.
JQUERY AND AJAX
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
.. WHAT IS JQUERY JQuery is a fast, small, and feature-rich JavaScript library. Simplifies the interaction between HTML and JavaScript. The jQuery library.
CSS Cascading Style Sheets. Session Checklist ► Learn why style sheets are needed and their advantages and disadvantages ► Learn the format of a style.
CSS (Cascading Style Sheets). CSS CSS – Cascading Style Sheets – Cascade because of the way CSS rules can stack on top of each other. Allows you to add.
JQuery is a fast, small, and feature-rich javascript library. It makes things like HTML document traversal and manipulation, event handling, animation,
JQuery Fundamentals Introduction Tutorial Videos
What is jQuery?.
Tek Raj Chhetri Code for Humans not for machine.
Introduction to Web programming
JQUERY Online TRAINING AT GOLOGICA
jQuery The Easy JavaScript Nikolay Chochev Technical Trainer
JQuery with ASP.NET.
..
E-commerce Applications Development
Made By : Lavish Chauhan & Abhay Verma
Web Programming and Design
Presentation transcript:

jQuery Introduction © Copyright 2014, Fred McClurg All Rights Reserved

Other General JS Libraries Prototype + Scriptaculous: MooTools: YUI (Yahoo User Interface): Dojo Toolkit: 2

What is jQuery? Defined: The most popular general purpose JavaScript library available. It provides commonly requested functionality in a standard and cross-browser compatible fashion. Website: Documentation (excellent): 3

jQuery Features Advanced element selectors Cross browser compatible DOM traversal and manipulation Display effects and animation Event handling AJAX functionality 4

Production vs Development Version Discussion: The only difference between the Production and Development version of jQuery is that the Production version is a “minified” copy of the Development version. The “minified” version has all comments, newlines, and extra spaces removed. Production Version: The Production version is recommended for most web sites. Because it is smaller, the download times are quicker. Development Version: If there is an error in the jQuery library, the Development version is useful for debugging because the code is on multiple lines and contains comments. 5

How do I use jQuery? Discussion: You include jQuery the same way you would include any external JavaScript file. Local Installation Example: <script type="text/javascript" src="js/jquery.min.js"> Content Delivery Network (CDN) Example (preferred): 6 eventViaElement.html

“Hello World” CSS Include Discussion: CSS code can specified inline via the tag or included via the link tag. Inline via tag: div#divBlock {... } Included via tag: <link rel="stylesheet" type="text/css" href="css/style.css"> 7 helloWorldViaJavaScript.html helloWorldViajQuery.html

“Hello World” CSS Content Discussion: The following JavaScript and jQuery example will use the style below for a blue DIV. Example CSS: div#divBlock { width: 300px; height: 100px; line-height: 100px; /* vertical alignment */ font-size: 50px; font-weight: bold; color: yellow; background-color: blue; text-align: center; padding: 25px; } 8 style.css

“Hello World” via JavaScript Discussion: The element is retrieved via getElementById() method. Then the HTML is set via the “innerHTML” property. Example: var theDiv = document.getElementById( "divBlock" ); theDiv.innerHTML = "Hello World"; 9 helloWorldViaJavaScript.html

“Hello World” via jQuery Discussion: The element is retrieved via “div#divBlock” selector. Then the HTML content is set via the “html” method. Example: jQuery( "div#divBlock" ).html( "Hello World" ); 10 helloWorldViajQuery.html

jQuery() and $()  All jQuery calls use the “jQuery” object. For example: jQuery( "div#divBlock" ).html( "Hello World" );  The “$” is an alias for the “jQuery” object. For example: $( "div#divBlock" ).html( "Hello World" ); 11 helloWorldViajQuery.html

12 jQuery Selectors Discussion: One of the strengths of jQuery is that it has very robust element selector specification. Documentation: Example: // all DIVs containing a (nested) paragraph $( "div:has(p)" ).addClass( "classy" ); $( "#idName" ).append( " " ); $( "p.class" ).attr( "title", "Call me Mr." ); $("h1:contains('John')").css("color", "red");

Event Handling Discussion: jQuery can also add event handlers to elements. Documentation: Example: $("p").click( function() { alert('You clicked?'); }); 13 elementEventClick.html

Window Loading Discussion: The jQuery “ready()” method takes the place of the “onload” event. Example: $(document).ready( function() { $(".quote").click( function() { alert( "What's up?" ); }); 14 windowLoadViaReadyEvent.html

Effects Discussion: The most common effects are “hide()”, “show()”, “fadeIn()”, “fadeOut()”, “toggle()”. Documentation: 15

fadeOut() Effect Example: Click to Fade $( "#fadeDiv" ).click( function() { $( "#fadeImage" ).fadeOut( "slow", function() { alert( "Fade completed" ); // animation complete }); 16 effectsFadeOut.html

toggle() Effect Example: Click to Toggle $( "#toggleDiv" ).click( function() { $("#toggleImage").toggle( "slow", function() { alert( "Toggle completed" ); }); 17 effectsToggle.html