School of Computing and Information Systems CS 371 Web Application Programming jQuery.

Slides:



Advertisements
Similar presentations
Diego Guidi - DotNetMarche. DOM tree is clunky to use No multiple handlers per event No high-level functions Browser incompatibilities = jQuery to the.
Advertisements

JavaScript – Quiz #8 Lecture Code:
JavaScript & jQuery JavaScript and jQuery introduction.
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.
Building a Rich Internet Application with jQuery Ben Dewey twentysix New York Fill this space.
Sep 2010 Palestinian Land Authority IT Department By Salam Turkman1 Jquery (write less do more)
Ajax Dr Jim Briggs WEBP Ajax1. 2 Ajax Asynchronous JavaScript And XML Method of creating more interactive web applications Moves more of the application.
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 (
Agenda What is AJAX? What is jQuery? Demonstration/Tutorial Resources Q&A.
CS 174: Web Programming April 9 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
JQuery CS 268. What is jQuery? From their web site:
M. Taimoor Khan Courtesy: Norman White.
 Computer Information System Club focused on the understanding and applied learning of web development.  The club was founded in April 5,  We.
PhpXperts What is jQuery Javascript Library Fast and concise Simplifies the interaction between HTML and JavaScript.
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
Nguyen Ich Cuong.  Course duration: 45’  Purpose: Present Introduction to JQuery  Targeted attendees: NICorp Trainee  Tests/quiz: Yes - 10’
By Jon Marozick.  JavaScript toolkit  Aims to change the way developers think  jQuery philosophy  Find some HTML  Do something to it.
JQuery March 09 th,2009 Create by
A really fairly simple guide to: mobile browser-based application development (part 4, JQuery & DOM) Chris Greenhalgh G54UBI / Chris Greenhalgh.
JQuery Adding behaviour…. Lecture Plan Review of last lesson Adding behaviour –click, mouseover Animation –fade, slideDown Navigation –parent, find, next.
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.
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
. Taught by: Muhammad Ali Baloch midahot. WHAT IS JQUERY JQuery is a fast, small, and feature-rich JavaScript library. Simplifies the interaction between.
CHAPTER 5 jQuery อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Unleash the Power of jQuery Doncho Minkov Telerik Software Academy academy.telerik.com Senior Technical Trainer
Introduction to jQuery. jQuery Quick facts Is a cross-compatible JavaScript library Released in 2006 by John Resig Simplifies HTML document traversing,
Fundamentals, Ajax, Templates, UI Doncho Minkov Telerik Corporation
JQuery Introduction © Copyright 2014, Fred McClurg All Rights Reserved.
LOGO sparcs.org 1 jQuery Tutorial Presenter ㅎㅇㅎㅇ.
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.
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.
Web Technologies Lecture 8 JQuery. “A fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax.
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.
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 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.
JQuery form submission CIS 136 Building Mobile Apps 1.
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 The Write Less, Do More, JavaScript Library.
Martin Kruliš by Martin Kruliš (v1.1)1.
JQuery.
-By Yogita Nirmal.
JavaScript UI Development and jQuery Library
Tek Raj Chhetri Code for Humans not for machine.
Unleash the Power of jQuery
Introduction to Web programming
JQUERY Online TRAINING AT GOLOGICA
Fundamentals, DOM, Events, AJAX, UI
HTML Level II (CyberAdvantage)
jQuery The Easy JavaScript Nikolay Chochev Technical Trainer
JQuery with ASP.NET.
Web Programming Language
Secure Web Programming
E-commerce Applications Development
Web Programming Language
Chengyu Sun California State University, Los Angeles
JQuery.
Presentation transcript:

School of Computing and Information Systems CS 371 Web Application Programming jQuery

School of Computing and Information Systems CS 371 Web Application Programming Frameworks Most programmers "box up" code that is repeated (libraries) Sometimes programmers write code that is clever and general other programmers want to share it open source or third party products for the web, can be client side or server side frameworks

School of Computing and Information Systems CS 371 Web Application Programming Frameworks often provide templates caching security database access scaffolding url mapping ajax can enforce structure such as MVC or 3 tiered can also be a content management system (CMS)

School of Computing and Information Systems CS 371 Web Application Programming jQuery collection of javaScript functions does not really enforce any models or provide content management just a very useful javaScript library used by over 55% of the 10,000 most visited websites jQuery and jQuery UI

School of Computing and Information Systems CS 371 Web Application Programming jQuery – general concepts small size include it like any javaScript code library can be copied to server or use the google API site example goal is to separate structure (html) from behavior (js)

School of Computing and Information Systems CS 371 Web Application Programming jQuery - basics place code within script tags alongside any javaScript code basically select objects and then use jQuery functions $(select something).doSomething examples $(document).ready(handler) $('img').attr("src") $('#special').addClass("hairy")

School of Computing and Information Systems CS 371 Web Application Programming jQuery - selecting uses a combination of css selection and xpath examples $('#spec' > li)// li that are children of spec id $('.new td')// td's within class "new" tags $('li:even')//even rows of li tags ready function (when page is loaded) $(document).ready(handler) $(handler) example: $(function(){alert("it's loaded")});

School of Computing and Information Systems CS 371 Web Application Programming jQuery - basics can work with the DOM like in javaScript, but with much less code many effects like fading and animate manipulation like changing class, content and positioning event handling AJAX

School of Computing and Information Systems CS 371 Web Application Programming Attributes class: $('#someId').addClass("highlight"); $('li').removeClass("oldClass"); $('#myID').toggleClass("classA"); // remove if exists – add it otherwise content: use val() to get or val(data) to set controls use html(), html(data) to get/set html code attr("name") or attr("name","val")

School of Computing and Information Systems CS 371 Web Application Programming Traversal relations: $('table').children() parent, parents, parentsUntil, siblings… location: $('li').first() last, next, nextAll, nextUntil, prev, etc. filter: $("div").css("background", "#c8ebcc").filter(".middle").css("border-color", "red"); etc.

School of Computing and Information Systems CS 371 Web Application Programming Manipulation class and content (already covered) positioning (innerWidth, outerWidth, width, height, scrollLeft, etc. manipulating elements – clone, detach, empty, appendTo, insertAfter, remove, replaceAll, etc.

School of Computing and Information Systems CS 371 Web Application Programming Events $('td.hey').click(function(){//code here }); click, dblclick, change, blur, focus, hover load mouseup, mousedown mouseover, mouseout keydown, keyup, keypress off

School of Computing and Information Systems CS 371 Web Application Programming Effects hide, show fadeIn, fadeOut, fadeTo slideDown, slideUp, slideToggle queue, dequeue, clearQueue animate $("#go").click(function(){ $("#block").animate({ width: "70%", borderWidth: "10px" }, 1500 ); });

School of Computing and Information Systems CS 371 Web Application Programming AJAX var menuId = $("ul.nav").first().attr("id"); var request = $.ajax({ url: "script.php", type: "POST", data: {id : menuId}, dataType: "html" }); request.done(function(msg) { $("#log").html( msg ); }); request.fail(function(jqXHR, textStatus) { alert( "Request failed: " + textStatus ); });

School of Computing and Information Systems CS 371 Web Application Programming jQuery UI make web apps more like desktop menus tabs dialogs themes controls datepicker sliders progressbar, etc.

School of Computing and Information Systems CS 371 Web Application Programming Plugins slidesJS – slideshow Jcrop – add cropping to app jqGrid – grid boxes Tablesorter – makes html table sortable many, many more