LOGO sparcs.org 1 jQuery Tutorial 100610. 2 Presenter ㅎㅇㅎㅇ.

Slides:



Advertisements
Similar presentations
Diego Guidi - DotNetMarche. DOM tree is clunky to use No multiple handlers per event No high-level functions Browser incompatibilities = jQuery to the.
Advertisements

JavaScript – Quiz #8 Lecture Code:
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
By ishaq shinwari.  jQuery is a lightweight, "write less, do more", JavaScript library.  The purpose of jQuery is to make it much easier to use JavaScript.
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,
CT-376 jQuery Most popular javascript library today Latest version:
JQuery CS 380: Web Programming. What is jQuery? jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling,
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:
JQuery A Javascript Library Hard things made eas(ier) Norman White.
Introduction to jQuery Giuseppe Attardi Università di Pisa Some slides from: BreadFish.
CS7026 jQuery Events. What are Events?  jQuery is tailor-made to respond to events in an HTML page.  Events are actions that can be detected by your.
Building a Rich Internet Application with jQuery Ben Dewey twentysix New York Fill this space.
JQUERY/AJAX ALIREZA KHATAMIAN DELARAM YAZDANSEPAS.
School of Computing and Information Systems CS 371 Web Application Programming 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 (
M. Taimoor Khan Courtesy: Norman White.
PhpXperts What is jQuery Javascript Library Fast and concise Simplifies the interaction between HTML and JavaScript.
JavaScript, jQuery & AJAX. What is JavaScript? An interpreted programming language with object oriented capabilities. Not Java! –Originally called LiveScript,
By Jon Marozick.  JavaScript toolkit  Aims to change the way developers think  jQuery philosophy  Find some HTML  Do something to it.
JavaScript Teppo Räisänen LIIKE/OAMK HTML, CSS, JavaScript HTML defines the structure CSS defines the layout JavaScript is used for scripting It.
Day 17. » Client side and Server side » Since PHP is Server side and can output anything we want, we can output to JS. » With JS libraries, we can create.
JQuery March 09 th,2009 Create by
JQuery 10/21. Today jQuery Some cool tools around the web JavaScript Libraries Drawing libraries HTML Frameworks Conventions.
JQuery Adding behaviour…. Lecture Plan Review of last lesson Adding behaviour –click, mouseover Animation –fade, slideDown Navigation –parent, find, next.
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.
ALBERT WAVERING BOBBY SENG. Week 5: More JavaScript  Quiz  Announcements/questions.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 7.
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.
JQuery Introduction © 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.
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.
Web Programming Language Week 9 Dr. Ken Cosh Introducing jQuery.
Intro to jQuery. What is jQuery? A JavaScript library Lightweight (about 31KB for the minified version) Simplifies HTML document traversing (DOM), event.
JavaScript Overview Developer Essentials How to Code Language Constructs The DOM concept- API, (use W3C model) Objects –properties Methods Events Applications;
Web Programming Java Script & jQuery Web Programming.
1 What is JQuery. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax* interactions.
Unit 13 –JQuery Basics Instructor: Brent Presley.
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.
Web Technologies Lecture 8 JQuery. “A fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax.
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.
CS 490: Computer Graphics Graphics Programming and HTML Canvas.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
JQuery Tutorial. What is jQuery jQuery is a JavaScript Library The purpose of jQuery is to make it much easier to use JavaScript on your website JavaScript.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
JQuery The Write Less, Do More, JavaScript Library.
.. WHAT IS JQUERY JQuery is a fast, small, and feature-rich JavaScript library. Simplifies the interaction between HTML and JavaScript. The jQuery library.
JQuery.
JQuery Fundamentals Introduction Tutorial Videos
Introduction to jQuery
Tek Raj Chhetri Code for Humans not for machine.
CS5220 Advanced Topics in Web Programming JavaScript and jQuery
Intro to jQuery jQuery is a popular, and extensible, JavaScript library Supports … DOM manipulation CSS manipulation HTML event methods Effects & animations.
Introduction to Web programming
JQUERY Online TRAINING AT GOLOGICA
CS3220 Web and Internet Programming Client-Side JavaScript and jQuery
HTML Level II (CyberAdvantage)
JQuery with ASP.NET.
Introduction to jQuery
Web Programming Language
..
E-commerce Applications Development
Chengyu Sun California State University, Los Angeles
CS 352: Computer Graphics Graphics Programming and HTML Canvas.
Web Client Side Technologies Raneem Qaddoura
JQuery.
Presentation transcript:

LOGO sparcs.org 1 jQuery Tutorial

2 Presenter ㅎㅇㅎㅇ

3 Background Topics  HTML  Javascript  CSS  CGI  AJAX

4 Evolution

5 Javascript  A script language that interpreted by browser  OOP  Dynamic typing  Run-time evaluation

6 Javascript  Cannot access host computer (except cookie)  Same origin policy  Non-persistence  Cannot access history object  Cannot write the value of file upload field

7 Javascript  Javascript is not a good language design(??)  Writing Javascript code is tedious, time- consuming, and error-prone (really??)  Browser compatibility  AJAX

8 Alternatives  jQuery  Mootools  Prototype  YUI

9 jQuery  jQuery is a new kind of JavaScript library jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.

10 Presenter 공부해봅시다 ㅋㅋ

11 jQuery  Only jquery.js file is needed <script type="text/javascript“ src=" query-latest.min.js">  What is jquery.js?

12 jQuery  Print Hello jQuery Hello, World! //jQuerypractice.js file $(document).ready(function(){ $(“#hello”).html(“Hello, jQuery!”); });

13 jQuery Core  jQuery( selector, [ context ] ) : Accepts a string containing a CSS selector which is then used to match a set of elements and returns a jQuery object.  jQuery( element )  jQuery( elementArray )  jQuery( jQuery object )  jQuery()  can be written as $()

14 jQuery Events .ready( handler ) : execute handler when the DOM is fully loaded. js function printhello(){ $(“#hello”).html(“Hello, jQuery!”); } $(document).ready(printhello());  Same as window.onload??? js $(document).ready(function(){ $(“#hello”).html(“Hello, jQuery!”); });

15 jQuery Events .bind() .blur() .change() .click() .focus() .hover() .select() .toggle() .trigger() .submit() .mousedown() .mouseenter() .mouseleave() .keypress() .keyup()

16 jQuery Events $(document).keyup(function(event){ switch(event.which){ case 32: alert(“32 pressed”); break; } });  event.preventDefault()  event.stopPropagation()

17 jQuery Selectors  follows CSS1~3 Selectors  :animated  :has()  :gt()

18 jQuery Attributes .addClass() .removeClass() .hasClass() .toggleClass() .attr() .removeattr() .val() .html()

19 jQuery Each .each() : Iterate over a jQuery object, executing a function for each matched element. html garbage food abroad js $(document).ready(function(){ $('li').each(function(index) { alert(index + ': ' + $(this).text()); });

20 jQuery Traversing .add() .children() .contents() .filter() .find() .next() .not() .prev()

21 jQuery Manipulations .append() .appendTo() .clone() .detach() .insertAfter() .insertBefore() .remove()

22 jQuery CSS .css() .height() .width() .position() .offset() .scrollTop() .scrollLeft()

23 jQuery Effect .animate() html left right js $(document).ready(function(){ $(".block").css({ 'position': 'absolute', 'backgroundColor': "#abc", 'left': '100px', 'width': '90px', 'height': '90px', 'margin': '5px' }); $("#left").click(function(){ $(".block").animate({left: "-=50px"}, "slow"); }); $("#right").click(function(){ $(".block").animate({left: "+=50px"}, "slow"); });

24 jQuery Effect .fadeIn() .hide() .show() .toggle()

25 jQuery AJAX  jQuery.get( url, [ data ], [ callback(data, textStatus, XMLHttpRequest) ], [ dataType ] ) Returns: XMLHttpRequestXMLHttpRequest  jQuery.post()  jQuery.getJSON() .load()  jQuery.getScript()

26 만들자 jQuery HTML SPARCS serverusername Does ‘username’ exist? yes/no check… print

27 jQuery AJAX html js $(document).ready(function(){ $("#username_submit").click(function(){ $.get('jqtest.cgi', {"username" : $("#username").val()}, function(data){ $('#check_result').html(data); }); #! /usr/bin/python import cgi import os form = cgi.FieldStorage() print "Content-Type: text/html\n\n“ username = form.getvalue('username', '1') if os.path.exists("/home/“ + username + "/"): print "exists" else: print "not exists" CGI

28 Data transfer & save  XML (xPath)  JSON  HTML  Cookie  window object

29 jQuery Plug-in 

30 Presenter 거의끝났음 !! 개발하며 생각해야할점 …

31 Let’s consider…  What does jQuery(JS) do?  Fat client vs Thin client

32 Let’s consider…  Separate all layers!!!  No event handler in HTML template  No  location.replace() instead of location.href  Users don’t like popup

33 Accessibility  What if javascript is not available?  screen reader

34 Homework  look Gmail  단축키로 커서를 움직일 때 마다 auto scrolling, focusing 을 하는 스크립트를 작성 해 보자.

LOGO sparcs.org 35