Philly.NET Hands-On jQuery + Plug-ins Bill Wolff, Rob Keiser.

Slides:



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

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.
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,
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:
JQuery A Javascript Library Hard things made eas(ier) Norman White.
JQuery The Way to JavaScript and Rich Internet Applications.
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.
Building a Rich Internet Application with jQuery Ben Dewey twentysix New York Fill this space.
JQUERY/AJAX ALIREZA KHATAMIAN DELARAM YAZDANSEPAS.
School of Computing and Information Systems CS 371 Web Application Programming 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.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
Anatomy of an App HTML, CSS, jQuery, jQuery Mobile CIS 136 Building Mobile Apps 1.
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 (
M. Taimoor Khan Courtesy: Norman White.
PhpXperts What is jQuery Javascript Library Fast and concise Simplifies the interaction between HTML and JavaScript.
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.
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
CHAPTER 5 jQuery อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
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.
LOGO sparcs.org 1 jQuery Tutorial Presenter ㅎㅇㅎㅇ.
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.
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.
IS2802 Introduction to Multimedia Applications for Business Lecture 07: Introduction to jQuery Rob Gleasure
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 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)
Engr. Md. Nazim Uddin M.Sc. Eng. (CSE), B.Sc. Engg. (CSE), MIEB Cell: Website:
JQuery is a fast, small, and feature-rich javascript library. It makes things like HTML document traversal and manipulation, event handling, animation,
JQuery.
JQuery Fundamentals Introduction Tutorial Videos
CS7026 jQuery Effects.
Introduction to Web programming
-By Yogita Nirmal.
Tek Raj Chhetri Code for Humans not for machine.
Unleash the Power of jQuery
Intro to jQuery jQuery is a popular, and extensible, JavaScript library Supports … DOM manipulation CSS manipulation HTML event methods Effects & animations.
Introduction to Web programming
JQuery.
JQUERY Online TRAINING AT GOLOGICA
Fundamentals, DOM, Events, AJAX, UI
JavaScript and Events.
jQuery The Easy JavaScript Nikolay Chochev Technical Trainer
JQuery with ASP.NET.
jQuery A Javascript Library Hard things made eas(ier)
Introduction to jQuery
Web Programming Language
An introduction to jQuery
E-commerce Applications Development
Web Programming Language
Getting started with jQuery
CS7026 jQuery Events.
Introduction to jQuery
SEEM4540 Tutorial 3 jQuery Wong Wai Chung.
JQuery.
Presentation transcript:

Philly.NET Hands-On jQuery + Plug-ins Bill Wolff, Rob Keiser

Why jQuery?  Pre-requisites: HTML – CSS – JavaScript  Lightweight JS library that reduces coding time  Wraps common tasks into single line or method  Framework for custom and downloaded plug-ins  Used by most major web players like Microsoft, Google  Used in 55% of 10,000 top web sites  Cross browser compliance including IE6  Free, open source MIT license  Developed by John Resig in 2006  Current release is 1.9.1

jQuery downloads  Versions  Production is minified and compressed  Development is readable and much larger  Example   Content Delivery Network (CDN)   Visual Studio MVC  Included in the default solution  Scripts folder with reference in bundle package

jQuery syntax  $(selector).action()  $ indicates jQuery entry point  (selector) to query HTML elements using CSS syntax  action() is a method built into jQuery or provided by a plug-in  Use document ready event to make sure DOM is fully loaded  $(document).ready(function(){  // jQuery methods go here...  });  Shorthand and more popular approach  $(function(){  // jQuery methods go here...  });

jQuery selectors  Use $() to select and manipulate HTML elements  $(“p”) – select all paragraph tags  $(”#bill”) – pound selects all tags with id of bill  $(“.bigbutton”) – period selects all tags by class name  $("ul li:first") – first li inside a ul  $("tr:even") – select even rows in a table  $("[href]") – all elements with an href attribute

jQuery events  Events fire based on user or system input  click() - user clicks on the HTML element  dblclick() - user double-clicks on the HTML element  mouseenter() - mouse pointer enters the HTML element  mouseleave() - mouse pointer leaves the HTML element  mousedown() - mouse pointer leaves the HTML element  mouseup() - mouse pointer leaves the HTML element  hover() – combines mouseenter and mouseleave  focus() - form field gets focus  blur() - form field loses focus  Example  $("p").click(function(){ // action goes here!! });

jQuery hide/show  Hide and show HTML elements  $("#hide").click(function(){ $("p").hide(); }); $("#show").click(function(){ $("p").show(); });  Toggle combines hide and show  $("button").click(function(){ $("p").toggle(); });

jQuery fading  Fade an element in and out of visibility with optional speed  $("button").click(function(){ $("#box").fadeIn(); });  $("button").click(function(){ $("# box ").fadeOut(“slow”); });  Combining fade in and out  $("button").click(function(){ $("#box").fadeToggle(2000); });  Fading to a given opacity value between 0 and 1  $("button").click(function(){ $("# box ").fadeTo("slow",0.35); });

jQuery sliding  Use to slide down an element  $("#button").click(function(){ $("#panel").slideDown(); });  Use to slide up an element  $("# button ").click(function(){ $("#panel").slideUp(“slow”); });  Combine slide up and down  $("# button ").click(function(){ $("#panel").slideToggle(2000); });

jQuery animate  Create custom animations with CSS properties and optional speed  $("button").click(function(){ $(“box").animate({top:'250px'}); });  $("button").click(function(){ $(“box").animate({left:‘+=250px'}); });  Queued animations  $("button").click(function(){ var div=$("div"); div.animate({height:'300px',opacity:'0.4'},"slow"); div.animate({width:'300px',opacity:'0.8'},"slow"); div.animate({height:'100px',opacity:'0.4'},"slow"); div.animate({width:'100px',opacity:'0.8'},"slow"); });

jQuery chaining  Run multiple jQuery methods on the same selector per statement  $("#box").css("color",“blue").fadeIn(1000).fadeOut(1000);  Cleaner syntax using multiple lines  $("#box").css("color",“blue").fadeIn(1000).fadeOut(1000);

jQuery HTML  DOM manipulation  text() - sets or returns the text content of selected elements  html() - sets or returns the content of selected elements and markup  $("#box").html(" Hello world! ");  val() - sets or returns the value of form fields  attr() - sets or returns the value of attributes  Creating and removing elements  append() - inserts content at the end of the selected elements  $(“ul").append(" Appended item ");  prepend() - inserts content at the beginning of the selected elements  after() - inserts content after the selected elements  before() - inserts content before the selected elements  remove() - removes the selected element and its children  empty() - removes the child elements from the selected element

jQuery CSS  CSS manipulation  addClass() - adds one or more classes to the selected elements  $("div").addClass("important");  removeClass() - removes one or more classes  toggleClass() - toggles between adding/removing classes  css() - sets or returns the style attribute  $(“button").css("background-color");  $("button").css("background-color", "red");  $("button").css({"background-color":“red","font-size":"150%"});

jQuery dimensions  There are built-in methods for element dimensions  width()  height()  innerWidth()  innerHeight()  outerWidth()  outerHeight()  Example  $("#box").width(400).height(300);

jQuery AJAX  Asynchronous JavaScript and XML loads data in the background  text, HTML, XML, or JSON using HTTP GET or POST  $(selector).load(URL,data,callback);