. Taught by: Muhammad Ali Baloch midahot. WHAT IS JQUERY JQuery is a fast, small, and feature-rich JavaScript library. Simplifies the interaction between.

Slides:



Advertisements
Similar presentations
Getting Started with jQuery. 1. Introduction to jQuery 2. Selection and DOM manipulation Contents 2.
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,
JQuery CS 380: Web Programming. What is jQuery? jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling,
JQuery A Javascript Library Hard things made eas(ier) Norman White.
Week 12: JQuery Write less, do more.. JQuery Basics Lightweight JavaScript Library – Emphasizes interaction between JavaScript and HTML – Reduces technical.
Vishal Kumar 06131A1258. Why you’re going to love jQuery!
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 (
Agenda What is AJAX? What is jQuery? Demonstration/Tutorial Resources Q&A.
JQuery CS 268. What is jQuery? From their web site:
Getting Started.  jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions.
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’
What is jQuery?  JavaScript Library  Functionality  DOM scripting & event handling  Ajax  User interface effects  Form validation 2.
JQuery Javascript Framework Aryo Pinandito. A Little Bit About jQuery  jQuery is an Open-Source JavaScript framework that simplifies cross-browser client.
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.
A really fairly simple guide to: mobile browser-based application development (part 4, JQuery & DOM) Chris Greenhalgh G54UBI / Chris Greenhalgh.
CSS/Photoshop Layouts – Quiz #7 Lecture Code:
JQuery Adding behaviour…. Lecture Plan Review of last lesson Adding behaviour –click, mouseover Animation –fade, slideDown Navigation –parent, find, next.
JQUERY | INTRODUCTION. jQuery  Open source JavaScript library  Simplifies the interactions between  HTML document, or the Document Object Model (DOM),
Review IDIA 619 Spring 2013 Bridget M. Blodgett. HTML A basic HTML document looks like this: Sample page Sample page This is a simple sample. HTML user.
JQuery Write less, do more…. Lecture Plan jQuery – what and why The ready function Creating Content Changing Elements Applying CSS Applying functions.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
CITS1231 Web Technologies JavaScript and Document Object Model.
Jquery Nasrullah. Jquery jQuery is a JavaScript Library. jQuery greatly simplifies JavaScript programming. jQuery is easy to learn.
JQuery Fairway Code Brew. Agenda What is jQuery? No, really, what is it? Show me something cool Why should I use it? Disturbing photo More features FlexBox.
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
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.
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.
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.
Web Programming Java Script & jQuery Web Programming.
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.
Understanding JavaScript and Coding Essentials Lesson 8.
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.
DOM & Jquery Nov. 09, Jquery JavaScript Library DOM (Document Object Model) HTML/XML/etc. Ajax (Asynchronous JavaScript and XML)
SE-2840 Dr. Mark L. Hornick 1 Dynamic HTML Making web pages interactive with JavaScript.
Agenda 1)Modern web standards overview 2)JavaScript library overview 3)Building a Single Page Application SPA.
.. WHAT IS JQUERY JQuery is a fast, small, and feature-rich JavaScript library. Simplifies the interaction between HTML and JavaScript. The jQuery library.
Shaun Geisert Matt Trice. What is jQuery?  Open source Javascript library/framework Created by John Resig  Their tagline – “The Write Less, Do More.
JQuery is a fast, small, and feature-rich javascript library. It makes things like HTML document traversal and manipulation, event handling, animation,
JQuery.
What is jQuery?.
Vinay Vasyani Internet Programming
Programming Web Pages with JavaScript
-By Yogita Nirmal.
12/04/12 JQuery I took these slides from the site because they were pretty good looking. Instructions for editing school and department titles: Select.
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.
CGS 3066: Web Programming and Design Spring 2017
Introduction to Web programming
JQUERY Online TRAINING AT GOLOGICA
The Cliff Notes Version
jQuery The Easy JavaScript Nikolay Chochev Technical Trainer
JQuery with ASP.NET.
..
Javascript and JQuery SRM DSC.
E-commerce Applications Development
Web Client Side Technologies Raneem Qaddoura
Presentation transcript:

. Taught by: Muhammad Ali Baloch midahot

WHAT IS JQUERY JQuery is a fast, small, and feature-rich JavaScript library. Simplifies the interaction between HTML and JavaScript. It makes things like HTML document (DOM) – traversal – manipulation – event handling – animation – and Ajax JQuery is a easy-to-use API that works across a multitude of browsers muhammadabaloch

WHY JQUERY Lightweight : 19KB in size (Minified and Gzipped) CSS1 - 3 Complaint Cross Browser – (IE 6.0+, FF 2+, Safari 3.0+, Opera 9.0+, Chrome) midahot

JQUERY IS CROSS-BROWSER A huge issue facing JavaScript is that no two browsers handle JavaScript in the same way. The way you locate page elements so you can work with them in code varies from browser to browser in a way that makes programmers’ hair stand on end. jQuery puts an end to that worry by giving you a common set of functions across all browsers. midahot

WHO’s USING JQUERY midahot

MOST POPULAR LIBRARIES YUI Prototype Dojo Jquery Mootools ExtJS Underscore muhammadabaloch

INITIAL REQUIREMENTS JAVASCRIPT – A scripting language(client side mostly) DOM – The way browser manipulates a web page in memory HTML – A markup language for web page muhammadabaloch

ADVANTAGES DOM MANIPULATION – DOM element selections functions – DOM traversal and modification CROSS BROWSER – CSS manipulation EVENT MANAGEMENT SIMPLIFIED AJAX EFFECTS AND ANIMATIONS JAVASCRIPT PLUGINS muhammadabaloch

DOM TREE muhammadabaloch

JQUERY IN YOUR PAGE $(document).ready(function(){ // Start here }); … midahot

JQUERY PHILOSOPHY midahot

JQUERY PHILOSOPHY $(“div”).addClass(“xyz”); jQuery Object } Do something with them } FIND SOME ELEMENTS midahot

JQUERY HELLO WORLD EXAMPLE jQuery Hello World $(document).ready(function(){ $(“p").html("Hello World !! (display due to jQuery)"); }); midahot

EASIER TO WRITE JQUERY THAN PURE JAVASCRIPT muhammadabaloch

JQUERY SELECTORS The jQuery selectors are one of the main feature in jQuery library. These selectors uses CSS syntax to allow page developer to easily identify the elements of page to operate upon with jQuery library methods. Note: For using JQuery library most effectively, you must be familiar with jQuery selectors. Syntax pattern of jQuery selector : $(selector).methodName(); The selector is a string expression that identify the element on which the method has to be implemented. Examples $("p").click(); $("p").hide(); midahot

JQUERY AND SELECTORS SelectorNameDescription #idID SelectorSelects a single element with the specified ID. elementType SelectorSelects all elements with the specified name..classClass SelectorSelects all elements with the specified class. *All SelectorSelects all elements. selector1, selector2, selectorNMultiple /Compound selector Selects the combined results of all the selectors. ancestor descendantdescendant selector Selects all elements that are descendants of a given ancestor. A descendant of an element could be a child, grandchild, great-grandchild, and so on, of that element. parent > childChild SelectorSelects all direct child elements specified by child of elements specified by parent. previous + nextnext adjacent selector Selects all next elements matching "next" that are immediately preceded by a sibling "prev". previous ~ siblingsnext siblings selector Selects all sibling elements that follow after the "prev" element, have the same parent, and match the filtering "siblings" selector. midahot

JQUERY / DOM COMPARISON midahot

JQUERY / DOM COMPARISON midahot

JQUERY / DOM COMPARISON HIDE DIVS WITH PURE JAVASCRIPT var divs = document.getElementByTagName('div'); for(i=0 ; i<=divs.length; i++){ Divs[ i ].style.display = 'none'; } HIDE DIV WITH JQUERY $(‘div’).hide(); muhammadabaloch

JQUERY / DOM COMPARISON SHOW/HIDE THE OLD WAY Click here to toggle visibility of #foo function toggle_visibility(id) { var e = document.getElementById(id); if(e.style.display == 'block') e.style.display = 'none'; else e.style.display = 'block'; } muhammadabaloch

JQUERY / DOM COMPARISON $().ready(function(){ $("a").click(function(){ $("#more").toggle("slow"); return false; }); muhammadabaloch

JQUERY AND SELECTORS midahot

JQUERY AND SELECTORS SELECT BY ID // Select By ID $(‘#foo’); midahot

JQUERY AND SELECTORS SELECT BY CLASS // Select by class $(‘.myClass’) midahot

JQUERY AND SELECTORS SELECT BY TAG // Select by tag Apple Pear $(“li”); Apple Pear midahot

JQUERY AND SELECTORS COMPOUND SELECTORS $(‘p.important,p.warning’); midahot

JQUERY AND SELECTORS DESCENDANT SELECTOR (“ancestor descendant”) Child: Grandchild: Sibling to form: $("form input").css("border", "2px dotted blue"); midahot

JQUERY AND SELECTORS CHILD SELECTOR Item 1 Item 2 Nested item 1 Nested item 2 Nested item 3 Item 3 $("ul.topnav > li").css("border", "3px double red"); midahot

JQUERY AND SELECTORS NEXT ADJACENT SELECTOR Name: Newsletter: $("label + input").css("color", "blue").val("Labeled!") midahot

JQUERY AND SELECTORS NEXT SIBLINGS SELECTOR div (doesn't match since before #prev) span#prev div sibling div sibling div niece span sibling (not div) div sibling $("#prev ~ div").css("border", "3px groove blue"); midahot

JQUERY AND ATTRIBUTE SELECTORS SelectorDescription E[a]Selects all the elements E that have an attribute 'a' of any value. E[a=v]Selects all the elements E that have an attribute 'a' whose value is exactly 'v'. E[a^=v]Selects all the elements E that have an attribute 'a' whose value starts with 'v'. E[a$=v]Selects all the elements E that have an attribute 'a' whose value ends with 'v'. E[a*=v]Selects all the elements E that have an attribute 'a' whose value contains 'v'. midahot