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.

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,
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.
Events Part III The event object. Learning Objectives By the end of this lecture, you should be able to: – Learn to use the hover() function – Work with.
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.
JQUERY/AJAX ALIREZA KHATAMIAN DELARAM YAZDANSEPAS.
CS428 Web Engineering Lecture 15 Introduction to Jquery.
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.
JQuery CS 268. What is jQuery? From their web site:
M. Taimoor Khan Courtesy: Norman White.
PhpXperts What is jQuery Javascript Library Fast and concise Simplifies the interaction between HTML and JavaScript.
Nguyen Ich Cuong.  Course duration: 45’  Purpose: Present Introduction to JQuery  Targeted attendees: NICorp Trainee  Tests/quiz: Yes - 10’
Chapter 19: Adding JavaScript
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.
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.
CHAPTER 5 jQuery อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Unleash the Power of jQuery Doncho Minkov Telerik Software Academy academy.telerik.com Senior Technical Trainer
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
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.
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.
Events Part I Mouse Events. Learning Objectives By the end of this lecture, you should be able to: – Understand what is meant by an ‘event’ – Appreciate.
IS2802 Introduction to Multimedia Applications for Business Lecture 07: Introduction to jQuery Rob Gleasure
Understanding JavaScript and Coding Essentials Lesson 8.
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.
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.
KAPITA SELEKTA INFORMATIKA Lasmedi Afuan, ST.M.Cs.
LECTURE #4: JQUERY AND FORM VALIDATION Josh Kaine Josh Kaine 4/1/2016.
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)
MICROSOFT AJAX CDN (CONTENT DELIVERY NETWORK) Make Your ASP.NET site faster to retrieve.
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.
Human Computer Interaction
Intro to jQuery jQuery is a popular, and extensible, JavaScript library Supports … DOM manipulation CSS manipulation HTML event methods Effects & animations.
Intro to JavaScript CS 1150 Spring 2017.
Introduction to Web programming
JQuery Basics 소속 / 작성자 이 문서는 나눔글꼴로 작성되었습니다. 설치하기.
JQuery.
JQUERY Online TRAINING AT GOLOGICA
The Cliff Notes Version
JavaScript and Events.
jQuery The Easy JavaScript Nikolay Chochev Technical Trainer
JQuery with ASP.NET.
Web Programming Language
MIS JavaScript and API Workshop (Part 2)
Javascript and JQuery SRM DSC.
E-commerce Applications Development
Document Object Model.
Web Programming Language
Getting started with jQuery
CS7026 jQuery Events.
SEEM4540 Tutorial 3 jQuery Wong Wai Chung.
Web Programming and Design
JQuery.
Presentation transcript:

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 JavaScript on your website. ( JavaScript - sometimes abbreviated as JS, is a prototype-based scripting language. JavaScript is used to add functionality to HTML tags like key press and mouse move)prototype-basedscripting language jQuery takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them into methods that you can call with a single line of code. jQuery also simplifies a lot of the other complicated things from JavaScript.

3 What is jQuery Put simply jQuery is a way to capture events from the browser, and then do something when this event occurs. eg when a user clicks we might want the page to animate or we may want to insert a new class to modify a pages CSS style rules.

4 Using JQuery To use jQuery the first thing you need to do is download the library and include a reference to it in your document. There are several ways to do this. You can: Download the jQuery library from jQuery.comjQuery.com Include jQuery from a CDN (Content Delivery Network) like Google (One advantage of this is that many users already have downloaded jQuery from Google or Microsoft when visiting another site. As a result, it will be loaded from cache when they visit your site, which leads to faster loading time.)

jQuery Syntax The jQuery syntax is tailor made for selecting HTML elements and performing some action on the element(s). Basic syntax is: $(selector).action() - $ is just an abbreviation for jQuery - (selector) is a “query” to find an HTML id or class - action() is a jQuery method you want to use on that element. Examples: $(this).hide() - hides the current element. $("p").hide() - hides all elements. $(".test").hide() - hides all elements with class="test". $("#test").hide() - hides the element with id="test".

jQuery Selectors jQuery selectors are one of the most important parts of jQuery. Selectors allow you to select and manipulate HTML elements. The three main jQuery selectors you will encounter are element selectors, #id selectors and.class selectors. An element selector selects elements based on the element name. An #id selector uses the id attribute of an HTML tag to find the specific element. A class selector finds elements with a specific class. **All selectors in jQuery start with the dollar sign and parentheses: $().

7 jQuery Events What are Events? All the different visitor's actions that a web page can respond to are called events. An event represents the precise moment when something happens. Examples: moving a mouse over an element selecting a radio button clicking on an element In jQuery, most events have an equivalent jQuery method. e.g. - To assign a click event to all paragraphs on a page, you can do this: $(“p").click(); The next step is to define what should happen when the event ‘fires’. You do this by passing a function to the event: $("p").click(function(){ // action goes here!! });

8 Commonly Used jQuery Events click() The function is executed when the user clicks on an HTML element. dblclick() The function is executed when the user double-clicks on an HTML element. mouseenter() The function is executed when the mouse pointer enters an HTML element. mouseleave() The function is executed when the mouse pointer leaves an HTML element. mousedown() / mouseup() The function is executed, when the left mouse button is pressed down / released, while the mouse is over an HTML element.

9 jQuery Effects Now that we understand the basics of jQuery Selectors and events, we can start to add interactivity to our sites using jQuery effects. There are two main sorts of effects you will probably find yourself using initially: Showing / Hiding Content the show(), hide(), slideUp(), slideDown(), fadeIn() and fadeOut() methods are all pretty self explanatory. toggle(), slideToggle() and fadeToggle() toggle between visible / invisible states, depending on the current visibility of the element Manipulating Css Styles css() — changes the css of an element addClass() and removeClass() — adds and removes CSS classes

EXERCISE 1 Exercise 1 intro to jQuery.

JQuery Plugins To make life easier there are many JQuery Plugins around. Plugins are extentions to JQuery framework that let you quickly and easily create specific functionality Some popular plugins include, galleries, video players, calendars, image sliders & Page Scrollers jquery-plugins-of.htmlhttp:// jquery-plugins-of.html

EXERCISE 2: Page Scroller Plugin STEP1: Download the plugin STEP 2: Add the JS file to your document STEP3: Initiate the Plugin STEP 4: Set ‘nav’ element STEP 5: Add sections (class=“section) to your page

Alternative Page Scrollers Vertical Scroller – vertical-or-horizontal-page-scrolling-with-jquery/ vertical-or-horizontal-page-scrolling-with-jquery/ Parallax Scrollers – scrolling-effect-plugins.htmhttp://smashinghub.com/7-jquery-parallax-and- scrolling-effect-plugins.htm – parallax/docs#.UEdsS0SIv98http://dev.jonraasch.com/scrolling- parallax/docs#.UEdsS0SIv98 – pluginhttp://jonraasch.com/blog/scrolling-parallax-jquery- plugin