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.

Slides:



Advertisements
Similar presentations
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,
Advertisements

JQuery CS 380: Web Programming. What is jQuery? jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling,
JQuery A Javascript Library Hard things made eas(ier) Norman White.
Sep 2010 Palestinian Land Authority IT Department By Salam Turkman1 Jquery (write less do more)
CS428 Web Engineering Lecture 15 Introduction to Jquery.
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:
Getting Started.  jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions.
PhpXperts What is jQuery Javascript Library Fast and concise Simplifies the interaction between HTML and JavaScript.
JQuery 10/21. Today jQuery Some cool tools around the web JavaScript Libraries Drawing libraries HTML Frameworks Conventions.
A really fairly simple guide to: mobile browser-based application development (part 4, JQuery & DOM) Chris Greenhalgh G54UBI / Chris Greenhalgh.
JQuery Adding behaviour…. Lecture Plan Review of last lesson Adding behaviour –click, mouseover Animation –fade, slideDown Navigation –parent, find, next.
JQUERY | INTRODUCTION. jQuery  Open source JavaScript library  Simplifies the interactions between  HTML document, or the Document Object Model (DOM),
Interacting with a Web Page using JavaScript Mat Kelly GTAI Presentation January 10, 2014.
Jquery Nasrullah. Jquery jQuery is a JavaScript Library. jQuery greatly simplifies JavaScript programming. jQuery is easy to learn.
JavaScript Frameworks Presented by Kyle Goins Also see:
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.
. Taught by: Muhammad Ali Baloch midahot. WHAT IS JQUERY JQuery is a fast, small, and feature-rich JavaScript library. Simplifies the interaction between.
Unleash the Power of jQuery Doncho Minkov Telerik Software Academy academy.telerik.com Senior Technical Trainer
Department Name (View Master > Edit Slide 1) JQuery I took these slides from the site because they were pretty good looking.
JQuery JavaScript is a powerful language but it is not always easy to work with. jQuery is a JavaScript library that helps with: – HTML document traversal.
CO1552 – Web Application Development Further JavaScript: Part 1: The Document Object Model Part 2: Functions and Events.
Intro to jQuery. What is jQuery? A JavaScript library Lightweight (about 31KB for the minified version) Simplifies HTML document traversing (DOM), event.
1 What is JQuery. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax* interactions.
IS2802 Introduction to Multimedia Applications for Business Lecture 07: Introduction to jQuery Rob Gleasure
Unit 13 –JQuery Basics Instructor: Brent Presley.
Web Technologies Lecture 8 JQuery. “A fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax.
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.
Chapter 6 Murach's JavaScript and jQuery, C6© 2012, Mike Murach & Associates, Inc.Slide 1.
Chapter 10 Dynamic HTML (DHTML) JavaScript, Third Edition.
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.
Shaun Geisert Matt Trice. What is jQuery?  Open source Javascript library/framework Created by John Resig  Their tagline – “The Write Less, Do More.
SharePoint & jQuery. About me Phill Duffy – Product Manager at Lightning Tools Ltd – Author of ‘Pro SharePoint with jQuery’ – MCTS Application Developer.
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?.
Programming Web Pages with JavaScript
-By Yogita Nirmal.
Tek Raj Chhetri Code for Humans not for machine.
Week 4: Introduction to Javascript
Human Computer Interaction
Scrolling Down vs. Multiple Pages
CGS 3066: Web Programming and Design Spring 2017
Introduction to Web programming
Tutorial 6 Topic: jQuery and jQuery Mobile Li Xu
JQuery.
JQUERY Online TRAINING AT GOLOGICA
The Cliff Notes Version
jQuery The Easy JavaScript Nikolay Chochev Technical Trainer
JQuery with ASP.NET.
Web Programming Language
..
JavaScript and the DOM MIS 2402 Jeremy Shafer Department of MIS
An Introduction to Animation
MIS JavaScript and API Workshop (Part 2)
SEEM4570 Tutorial 5: jQuery + jQuery Mobile
Getting started with jQuery
Javascript and JQuery SRM DSC.
E-commerce Applications Development
Document Object Model.
Wordpress test.cs.edinboro.edu.
Getting started with jQuery
Murach's JavaScript and jQuery (3rd Ed.)
JQuery.
JavaScript and the DOM MIS 2402 Maxwell Furman Department of MIS
Presentation transcript:

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 from menu: View > Master > Slide Master Click on each text area you wish to edit. Text will become editable. 1

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. (jQuery.com)

Why learn jQuery? Write less, do more: Performance Plugins $("p.neat").addClass("ohmy").show("slow"); Performance Plugins It’s standard … and fun! That little snippet loops through all <p> elements with the class "neat" and then adds the class "ohmy" to it, whilst slowly showing the paragraph in an animated effect. No browser checks, no loop code, no complex animation functions, just one line of code!

window.onload We cannot use the DOM before the page has been constructed. jQuery gives us a more compatibile way to do this. The DOM way The direct jQuery translation The jQuery way window.onload = function() { // do stuff with the DOM } $(document).ready(function() { // do stuff with the DOM }); $(function() { // do stuff with the DOM });

Aspects of the DOM and jQuery Identification: how do I obtain a reference to the node that I want. Traversal: how do I move around the DOM tree. Node Manipulation: how do I get or set aspects of a DOM node. Tree Manipulation: how do I change the structure of the page.

12/04/12 JQuery - A huge collection of predefined javascript objects and methods that are free to use and link to. - Go to http://jquery.com/ - JQuery also provides a mobile library and a CSS library with predefined styles for fancy buttons, links, headings and fancy mobile interfaces (like the one here http://corythoma.com/index3.html :) ). 19 Oct 2009

Accessing JQuery - Two ways to access it: 12/04/12 Accessing JQuery - Two ways to access it: -Download it and reference: <script src="jquery.js"></script> (in the same directory) -Reference the online page: <script src="http://code.jquery.com/jquery-1.4.2.min.js"></script> (Do this for class today)

12/04/12 How Does it Work? -Much of Jquery relies on the structure of the HTML to operate: -We can reference the type of code. <p>some text</p> <div> some other code</div> <button>make a button </button> By: <script> $(“div”).doSomeJquery(); </script>

How Does it Work? 2.0 -Or we can get specific: 12/04/12 How Does it Work? 2.0 -Or we can get specific: -We can reference the type of code. <p id = “p1”>some text</p> <div id= “Frank”> some other code</div> <button id = “Mildred”>make a button </button> By: <script> $(id).doSomeJquery(); $(“Frank”).stuff(); </script>

Remember, it is just Javascript. 12/04/12 Remember, it is just Javascript. -It is nothing fancy, it is just a bunch of methods, objects, and variables (look at the document). We can use It just like we would any javascript: <script src = jquery.js></script> <script type = “text/javascript”> var array = new Array(); var counter=0; function onClick(id){ array[counter]=id; counter+=1; $(id).hide();//<is jquery } </script>

What can JQuery do for you? 12/04/12 What can JQuery do for you? -Make something easy that was otherwise hard. EX: Show and hide some html. Compare: demo3.html to demo4.html -We can see how it makes life easier. .toggle() goes from .hide() and .show(), which is much easier than some css and complex statements in javascript.

Your Turn! - I made a simple Q&A web page yourTurn.html. 12/04/12 Your Turn! - I made a simple Q&A web page yourTurn.html. -Your task is to make it so when the question is clicked, the answer toggles between hidden and not hidden. Hint: No buttons or hyperlinks should be needed, and the .toggle is sufficient to accomplish this!!!

12/04/12 What else can we do? We can make stuff animate: Slide stuff from top, bottom, left, and right. As an example, look at the accordion menu given in menu.html.

12/04/12 Ever Wonder? -How to dynamically change some CSS with the click of a button? -.addClass(arg). Changes all classes to arg.

12/04/12 Lame Animations -Some people like the accordion menu, but are not sure how to do it. Jquery makes it easy with .slideDown() and .slideUp() and .is(“ :visable”). Try to take what you did for the first part and instead of show/hide, make it slide up and down.

Not so lame animations. -We are going to do this: In javascript!!! 12/04/12 Not so lame animations. -We are going to do this: In javascript!!!

12/04/12 Your Turn. Make some text, picture, table, or element do what animation.html does. Use the API and Documentation to get the additional information you may need to complete this!

Real World Examples: -weather.com -corythoma.com/index3.html 12/04/12 Real World Examples: -weather.com -corythoma.com/index3.html -jquery.com -espn.com Bottom line: Jquery is useful to know!