Computer Information System Information System California State University Los Angeles Jongwook Woo CIS 461 Web Development I JQuery Part I Jongwook Woo,

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 A Javascript Library Hard things made eas(ier) Norman White.
JQUERY/AJAX ALIREZA KHATAMIAN DELARAM YAZDANSEPAS.
Computer Information System Information System California State University Los Angeles Jongwook Woo CIS 461 Web Development I HTML DOM part II Jongwook.
Computer Information System Information System California State University Los Angeles Jongwook Woo CIS 461 Web Development I JQuery Part II Jongwook.
Week 12: JQuery Write less, do more.. JQuery Basics Lightweight JavaScript Library – Emphasizes interaction between JavaScript and HTML – Reduces technical.
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.
Anatomy of an App HTML, CSS, jQuery, jQuery Mobile CIS 136 Building Mobile Apps 1.
Definition from Wikipedia.  The Prototype JavaScript Framework  implemented as a single file of JavaScript code  named prototype.js (
Computer Information System Information System California State University Los Angeles Jongwook Woo CIS 461 Web Development I HTML 5 Jongwook Woo, PhD.
M. Taimoor Khan Courtesy: Norman White.
Nguyen Ich Cuong.  Course duration: 45’  Purpose: Present Introduction to JQuery  Targeted attendees: NICorp Trainee  Tests/quiz: Yes - 10’
A really fairly simple guide to: mobile browser-based application development (part 4, JQuery & DOM) Chris Greenhalgh G54UBI / Chris Greenhalgh.
JQUERY | INTRODUCTION. jQuery  Open source JavaScript library  Simplifies the interactions between  HTML document, or the Document Object Model (DOM),
Jquery Nasrullah. Jquery jQuery is a JavaScript Library. jQuery greatly simplifies JavaScript programming. jQuery is easy to learn.
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.
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 Javascript Library. JQuery Powerful JavaScript library –Simplify common JavaScript tasks –Access parts of a page using CSS or XPath-like expressions.
JQuery Introduction © Copyright 2014, Fred McClurg All Rights Reserved.
Browser scripting jQuery Edited by: Trần Thị Mỹ Dung Ref:w3schools.com.
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.
Creating Dynamic Webpages
Intro to jQuery. What is jQuery? A JavaScript library Lightweight (about 31KB for the minified version) Simplifies HTML document traversing (DOM), event.
IS2802 Introduction to Multimedia Applications for Business Lecture 07: Introduction to jQuery Rob Gleasure
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.
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
SHAREPOINT & JQUERY. Hi, my name and I am a product manager at lightning tools. I have been working with SharePoint for 5 years.
Computer Information System Information System California State University Los Angeles Jongwook Woo CIS 461 Web Development I HTML DOM part I Jongwook.
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.
JQuery “write less, do more”. jQuery - Introduction Simply a JavaScript library to simplify JavaScript programming itself Wraps long standard JavaScript.
KAPITA SELEKTA INFORMATIKA Lasmedi Afuan, ST.M.Cs.
Selectors & Events. What do Selectors do? What do Selectors do? Selectors allow you to manipulate DOM elements as a group or as a single node. This allows.
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.
Mobile Web Design Best Practices Three Approaches to Mobile Web: ◦ Develop a new mobile site with a.mobi TLD ◦ Create a separate website hosted within.
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 Element & Attribute Selectors, Events, HTML Manipulation, & CSS Manipulation.
JQuery Fundamentals Introduction Tutorial Videos
What is jQuery?.
-By Yogita Nirmal.
Tek Raj Chhetri Code for Humans not for machine.
Intro to jQuery jQuery is a popular, and extensible, JavaScript library Supports … DOM manipulation CSS manipulation HTML event methods Effects & animations.
jQuery A Javascript Library Hard things made eas(ier)
Intro to JavaScript CS 1150 Spring 2017.
Introduction to Web programming
JQuery Basics 소속 / 작성자 이 문서는 나눔글꼴로 작성되었습니다. 설치하기.
JQuery.
JQUERY Online TRAINING AT GOLOGICA
The Cliff Notes Version
JQuery with ASP.NET.
jQuery A Javascript Library Hard things made eas(ier)
Web Programming Language
..
E-commerce Applications Development
Document Object Model.
Introduction to jQuery
Murach's JavaScript and jQuery (3rd Ed.)
SEEM4540 Tutorial 3 jQuery Wong Wai Chung.
JQuery.
Presentation transcript:

Computer Information System Information System California State University Los Angeles Jongwook Woo CIS 461 Web Development I JQuery Part I Jongwook Woo, PhD California State University, Los Angeles Computer Information System Department

Jongwook Woo CSULA Jongwook Woo Computer Information System Information System Content njQuery HOME njQuery Intro njQuery Syntax njQuery Selectors

Jongwook Woo CSULA Jongwook Woo Computer Information System Information System What is jQuery? njQuery is a library of JavaScript Functions. ma lightweight "write less, do more" JavaScript library. nThe jQuery library contains the following features: mHTML element selections mHTML element manipulation mCSS manipulation mHTML event functions mJavaScript Effects and animations mHTML DOM traversal and modification mAJAX mUtilities

Jongwook Woo CSULA Jongwook Woo Computer Information System Information System jQuery Example nAdding the jQuery Library to Your Pages mstored as a single JavaScript file, –containing all the jQuery methods. mIt can be added to a web page with the following mark- up: Please note that the tag should be inside the page's section. nBasic jQuery Example mThe following example: the jQuery hide() method, –hiding all elements in an HTML document.

Jongwook Woo CSULA Jongwook Woo Computer Information System Information System jQuery Example (Cont’d) $(document).ready(function(){ $("button").click(function(){ $("p").hide(); }); }); This is a heading This is a paragraph. This is another paragraph. Click me

Jongwook Woo CSULA Jongwook Woo Computer Information System Information System jQuery Download nTwo versions of jQuery are available for downloading: one minified and one uncompressed (for debugging or reading). mBoth versions can be downloaded from jQuery.com.jQuery.com nAlternatives (hosted jQuery lib) to Downloading mGoogle mMicrosoft

Jongwook Woo CSULA Jongwook Woo Computer Information System Information System jQuery Syntax nBasic syntax is: $(selector).action() mA dollar sign to define jQuery mA (selector) to "query (or find)" HTML elements mA jQuery action() to be performed on the element(s) nExamples: m$(this).hide() - hides current element m$("p").hide() - hides all paragraphs m$("p.test").hide() - hides all paragraphs with class="test" m$("#test").hide() - hides the element with id="test"

Jongwook Woo CSULA Jongwook Woo Computer Information System Information System Selectors njQuery Element Selectors muses CSS selectors to select HTML elements. m$("p") selects all elements. m$("p.intro") selects all elements with class="intro". m$("p#demo") selects all elements with id="demo". njQuery Attribute Selectors muses XPath expressions to select elements with given attributes. m$("[href]") select all elements with an href attribute. m$("[href='#']") select all elements with an href value equal to "#". m$("[href!='#']") select all elements with an href attribute NOT equal to "#". m$("[href$='.jpg']") –select all elements with an href attribute that ends with ".jpg".

Jongwook Woo CSULA Jongwook Woo Computer Information System Information System Selectors (Cont’d) njQuery CSS Selectors mused to change CSS properties for HTML elements. mThe following changes the background-color of all p elements to yellow: –$("p").css("background-color","yellow");

Jongwook Woo CSULA Jongwook Woo Computer Information System Information System Selectors More Examples SyntaxDescription $(this)Current HTML element $("p")All elements $("p.intro")All elements with class="intro" $("p#intro")All elements with id="intro" $("p#intro:first")The first element with id="intro" $(".intro")All elements with class="intro" $("#intro")The first element with id="intro" $("ul li:first")The first element of each $("[href$='.jpg']")All elements with an href attribute that ends with ".jpg" $("div#intro.head")All elements with class="head" inside a element with id="intro"

Jongwook Woo CSULA Jongwook Woo Computer Information System Information System The Document Ready Function nprevent any jQuery code from running before the document is finished loading (is ready). $(document).ready(function(){ // jQuery functions go here... }); nsome examples of actions that can fail if functions are run before the document is fully loaded: mTrying to hide an element that doesn't exist mTrying to get the size of an image that is not loaded