JQuery.

Slides:



Advertisements
Similar presentations
Getting Started with jQuery. 1. Introduction to jQuery 2. Selection and DOM manipulation Contents 2.
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
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,
JQuery A Javascript Library Hard things made eas(ier) Norman White.
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.
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.
Fundamentals, DOM, Events, AJAX, UI Doncho Minkov Telerik Corporation
Definition from Wikipedia.  The Prototype JavaScript Framework  implemented as a single file of JavaScript code  named prototype.js (
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’
JavaScript, jQuery & AJAX. What is JavaScript? An interpreted programming language with object oriented capabilities. Not Java! –Originally called LiveScript,
JavaScript & jQuery the missing manual Chapter 11
JQuery March 09 th,2009 Create by
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
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.
Unleash the Power of jQuery Doncho Minkov Telerik Software Academy academy.telerik.com Senior Technical Trainer
JQuery Introduction © Copyright 2014, Fred McClurg All Rights Reserved.
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.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
JQuery Overview Unleash the Power of jQuery SoftUni Team Technical Trainers Software University
Intro to jQuery. What is jQuery? A JavaScript library Lightweight (about 31KB for the minified version) Simplifies HTML document traversing (DOM), event.
Unit 13 –JQuery Basics Instructor: Brent Presley.
Event Handling & AJAX IT210 Web Systems. Question How do we enable users to dynamically interact with a website? Answer: Use mouse and keyboard to trigger.
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.
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
JQuery Fundamentals Introduction Tutorial Videos
JavaScript and HTML Simple Event Handling 11-May-18.
JavaScript and Ajax (Ajax Tutorial)
Tek Raj Chhetri Code for Humans not for machine.
Unleash the Power of jQuery
CGS 3066: Web Programming and Design Spring 2017
Introduction to Web programming
JQuery Basics 소속 / 작성자 이 문서는 나눔글꼴로 작성되었습니다. 설치하기.
Tutorial 6 Topic: jQuery and jQuery Mobile Li Xu
JQUERY Online TRAINING AT GOLOGICA
The Cliff Notes Version
14 A Brief Look at JavaScript and jQuery.
JavaScript and HTML Simple Event Handling 19-Sep-18.
DHTML Javascript Internet Technology.
Web Programming A different world! Three main languages/tools No Java
jQuery The Easy JavaScript Nikolay Chochev Technical Trainer
JQuery with ASP.NET.
DHTML Javascript Internet Technology.
ISC440: Web Programming 2 AJAX
© 2015, Mike Murach & Associates, Inc.
Web Development & Design Foundations with H T M L 5
Web Programming Language
..
Teaching slides Chapter 6.
SEEM4570 Tutorial 5: jQuery + jQuery Mobile
Javascript and JQuery SRM DSC.
E-commerce Applications Development
JavaScript and Events CS Programming Languages for Web Applications
Chengyu Sun California State University, Los Angeles
CS7026 jQuery Events.
Murach's JavaScript and jQuery (3rd Ed.)
JavaScript and HTML Simple Event Handling 26-Aug-19.
JavaScript and Events CS Programming Languages for Web Applications
JavaScript and HTML Simple Event Handling 4-Oct-19.
JQuery.
Presentation transcript:

JQuery

Official Website for Jquery: www.jquery.com What is JQuery jQuery is a fast, small, and feature-rich JavaScript library. It simplifies, and provides easy to use API, for below things HTML document traversal and manipulation, event handling Animation effects Ajax(Asynchronous JavaScript and XML) With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript. Official Website for Jquery: www.jquery.com

Purpose of JQuery jQuery is a JavaScript toolkit designed to simplify various tasks by writing less code. Here is the list of important core features supported by jQuery: DOM manipulation: The jQuery made it easy to select DOM elements, negotiate them and modifying their content by using cross-browser open source selector engine called Sizzle. Event handling: The jQuery offers an elegant way to capture a wide variety of events, such as a user clicking on a link, without the need to clutter the HTML code itself with event handlers. AJAX Support: The jQuery helps to develop a responsive and feature-rich site using AJAX technology. Animations: The jQuery comes with plenty of built-in animation effects which you can use in your websites. Lightweight: The jQuery is very lightweight library - about 19KB in size (Minified and gzipped). Cross Browser Support: The jQuery has cross-browser support, and works well in IE 6.0+, FF 2.0+, Safari 3.0+, Chrome and Opera 9.0+  Latest Technology: The jQuery supports CSS3 selectors and basic XPath syntax.

How to use Jquery Library? There are two ways to use Jquery Library. By downloading Jquery library(.js file), and saving on required place/path. Using Jquery directly from CDN(Content Delivery Network) like Google, Microsoft,etc…, as specified below <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"> </script>

Jquery Selectors $() Function jQuery Selector is a function which makes use of expressions to find out matching elements from a DOM, based on the given criteria. $() Function function $() can be used for selecting a DOM HTML Tag or Tags, based on Tag name or id or class, as shown, below Using Tag name, $(‘a') is selector for tags named <a> Using id attribute of a Tag, $('#tag_id') is selector for tags with id as tag_id, i..e for eg <p id=“tag_id”> Using class attribute of a Tag, $('.class_name') is selector for tags with class as class_name, i..e for eg <table class=“class_name”>

Some Examples of Multiple Selectors Universal Selector (“*”) (“*”) selector selects all elements available in the DOM Multiple Elements Selector $(‘A, B, C,....') Selects elements satisfying individual Selectors A or B or C or any other Some Examples of Multiple Selectors $('div, a') − selects all the elements matched by div or anchor Tags. $('p strong, .someclass') − selects all elements matched by strong that are descendants of an element matched by p as well as all elements that have a class of someclass. $('p strong, #someid') − selects a single elements matched by strong that is descendant of an element matched by p as well as element whose id is someid.

Selector Selector Description $("p > *") This selector selects all elements that are children of a paragraph element. $("a#specialID.specialClass") This selector matches links with an id of specialID and a class of specialClass. $("p a.specialClass") This selector matches links with a class of specialClass declared within <p> elements. $("#container p") Selects all elements matched by <p> that are descendants of an element that has an id of container. $("li > ul") Selects all elements matched by <ul> that are children of an element matched by <li> $("code, em, strong") Selects all elements matched by <code> or <em> or <strong>. $("p strong, .myclass") Selects all elements matched by <strong> that are descendants of an element matched by <p> as well as all elements that have a class of myclass.

Selector Selector Description $(":empty") Selects all elements that have no children. $("p:empty") Selects all elements matched by <p> that have no children. $("p a.specialClass") This selector matches links with a class of specialClass declared within <p> elements. $("a[@rel]") Selects all elements matched by <a> that have a rel attribute. $("input[@name=myname]") Selects all elements matched by <input> that have a name value exactly equal tomyname. $("input[@name^=myname]") Selects all elements matched by <input> that have a name value beginning withmyname. $("a[@rel$=self]") Selects all elements matched by <a> that have rel attribute value ending with self.

Selector Selector Description $(":radio") Selects all radio buttons in the form. $(":checked") Selects all checked boxes in the form. $(":input") Selects only form elements (input, select, textarea, button). $(":text") Selects only text elements (input[type=text]). $("li:eq(2)") Selects the third <li> element. $("p:lt(3)") Selects all elements matched by <p> elements before the fourth one; in other words the first three <p> elements.

Animation Effects hhhhhhhh

Jquery Plugins hhhhhhhh

Jquery Event Handling Events are actions that can be detected by Web Application. An Handler can get executed, when a specific event such as below occurs in the web page. A mouse click A web page loading Taking mouse over an element Submitting an HTML form When these Events occur, the functionality you want to get executed need to be specified in Event Handler.

Binding an Event Handler Jquery bind() method can be used to bind an Event Handler to a specific Event such as click. selector.bind( eventType[, eventData], handler) Following is the description of the parameters: eventType: A string containing a JavaScript event type, such as click or submit. Refer to the next section for a complete list of event types. eventData: This optional parameter is a map of data that will be passed to the event handler. handler: A function to execute each time the event is triggered.

UnBinding an Event Handler As known, dynamically it is possible to bind an event to a Handler, similarly it is possible to unbind i..e unassociate an event with Handler, using unbind() method. selector.unbind(event)

List of commonly used events 1 blur Occurs when the element loses focus. 2 change Occurs when the element changes. 3 click Occurs when a mouse click. 4 dblclick Occurs when a mouse double-click. 5 Error Occurs when there is an error in loading or unloading etc.

List of commonly used events 6 Focus Occurs when the element gets focus. 7 keydown Occurs when key is pressed. 8 keypress Occurs when key is pressed and released. 9 keyup Occurs when key is released. 10 Load Occurs when document is loaded.

on() and off() methods Since Jquery 1.7, there are two new ways to attach and detach event handlers - .on() and .off() ready( fn ) Method The ready( fn ) method binds a function to be executed whenever the DOM is ready to be traversed and manipulated.

trigger( event, [data] ) Method The trigger( event, [data] ) method triggers an event on every matched element.

AJAX AJAX is an acronym standing for Asynchronous JavaScript and XML and this technology helps us to load data from the server without a browser page refresh. JQuery provides a rich set of AJAX methods to develop next generation web application.

Load simple data into an html element [selector].load( URL, [data], [callback] ); URL: The URL of the server-side resource to which the request need to be sent. It could be JSP, or PHP script which gets executed, and provides back html content. data: This optional parameter represents an object whose properties are serialized into properly encoded parameters to be passed to the request. If specified, the request is made using the POST method. If omitted, the GET method is used. callback: This callback function gets invoked after the response data has been loaded into the elements of the matched set. The first parameter passed to this function is the response text received from the server and second parameter is the status code.