Intro to jQuery jQuery is a popular, and extensible, JavaScript library Supports … DOM manipulation CSS manipulation HTML event methods Effects & animations.

Slides:



Advertisements
Similar presentations
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.
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,
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:
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:
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.
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 (
M. Taimoor Khan Courtesy: Norman White.
PhpXperts What is jQuery Javascript Library Fast and concise Simplifies the interaction between HTML and JavaScript.
Learning & Development Telerik Software Academy.
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.
1 Course Notes for WEB PROGRAMMING 4370/ These notes are intended for use by studentsThese notes are intended for use by students These notes are.
Jquery Nasrullah. Jquery jQuery is a JavaScript Library. jQuery greatly simplifies JavaScript programming. jQuery is easy to learn.
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.
1 Course Notes for CS1520 Programming Languages Part C By John C. Ramirez / Wonsun Ahn Department of Computer Science University of Pittsburgh.
CHAPTER 5 jQuery อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Unleash the Power of jQuery Doncho Minkov Telerik Software Academy academy.telerik.com Senior Technical Trainer
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.
LOGO sparcs.org 1 jQuery Tutorial Presenter ㅎㅇㅎㅇ.
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.
Unleash the Power of jQuery Learning & Development Team Telerik Software Academy.
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.
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.
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
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 7 JQUERY WHAT IS JQUERY? jQuery is a script. It is written in JavaScript.
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.
.. WHAT IS JQUERY JQuery is a fast, small, and feature-rich JavaScript library. Simplifies the interaction between HTML and JavaScript. The jQuery library.
CSCI 3100 Tutorial 5 JavaScript & Ajax Jichuan Zeng Department of Computer Science and Engineering The Chinese University of Hong.
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
CGS 3066: Web Programming and Design Spring 2017
Introduction to Web programming
JQuery Basics 소속 / 작성자 이 문서는 나눔글꼴로 작성되었습니다. 설치하기.
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 JQuery SRM DSC.
E-commerce Applications Development
Document Object Model.
Web Programming Language
CS7026 jQuery Events.
Front End Development workshop
SEEM4540 Tutorial 3 jQuery Wong Wai Chung.
JQuery.
Presentation transcript:

Intro to jQuery jQuery is a popular, and extensible, JavaScript library Supports … DOM manipulation CSS manipulation HTML event methods Effects & animations AJAX Hosted by Google Microsoft For Google, include: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> For Microsoft, include: <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.10.2.min.js"></script>

jQuery Syntax $(selector).action() Selectors similar to CSS Element: $("p") ID: $("#mypicture") Class: $(".bigcaps") All: $("*") Current selected element: $(this) Additional selectors :first, :last, :even, *odd :eq, :gt, :lt, :not [attribute], [attribute=value] See http://www.w3schools.com/jquery/jquery_ref_selectors.asp for a list of selectors

jQuery Event Methods Wait for document to load first: $(document).ready(function(){ // jQuery methods go here… }); Respond to a mouse click: $("p").click(function(){ // what to do when paragraph clicked… }); Respond to mouse hovering: $("#myimg1").hover(function(){ // what to do on mouseenter… }, function(){ // what to do on mouseleave… }); See http://www.w3schools.com/jquery/jquery_ref_events.asp for jQuery events handled

Other jQuery Methods css() each() Return a value $(selector).css("propertyname") Change a value $(selector).css("propertyname", "value") each() Used to iterate through matched elements $(selector).each(function() { // code for manipulating each }); See http://www.w3schools.com/jquery/ for more

jQuery Data Including data in an element <element data-name=value> Retrieving data $(element).data(name) Storing data $(element).data(name, value) See http://www.w3schools.com/jquery/ for more

Parallax Scrolling Create a webpage with elements to be scrolled Identify regular & slower scrolling elements Use data attributes to represent speed & initial position of slower elements Set CSS styles Elements scrolling normally get position:absolute; Elements scrolling more slowly get position:fixed;

Parallax Scrolling (con't) Use jQuery to initialize element positions $('img').each(function() { var ptop = eval($(this).data("top")); var pleft = eval($(this).data("left")); $(this).css('top', ptop + 'px'); $(this).css('left', pleft + 'px'); }); Define parallax function function parallax(){ var scrolled = $(window).scrollTop(); $('img').each(function() { var speed = eval($(this).data("speed")); var ptop = eval($(this).data("top")); $(this).css('top', ptop - (scrolled * speed) + 'px'); }); } Call function when the window scrolls $(window).scroll(function(e){ parallax(); });