Prototype jquery. To and from JavaScript libraries. Remy Sharp (remysharp.com)

Similar documents
Web Programming Step by Step

Introduction. Part I: jquery API 1. Chapter 1: Introduction to jquery 3

COURSE OUTLINE MOC 20480: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

Index. Boolean value, 282

write less. do more.

User Interaction: jquery

for Lukas Renggli ESUG 2009, Brest

footer, header, nav, section. search. ! Better Accessibility.! Cleaner Code. ! Smarter Storage.! Better Interactions.

Course Details. Skills Gained. Who Can Benefit. Prerequisites. View Online URL:

Web Design. Lecture 7. Instructor : Cristina Mîndruță Site : Cristina Mindruta - Web Design

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

PHP / MYSQL DURATION: 2 MONTHS

CSE 154 LECTURE 26: JAVASCRIPT FRAMEWORKS

!"#"## $% Getting Started Common Idioms Selectors Animations & Effects Array vs. NodeList Ajax CSS Credits. jquery YUI 3.4.

COURSE 20480B: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

jquery CS 380: Web Programming

jquery Basics jquery is a library of JavaScript functions which contains the following functions: HTML Element Selections

Web Development 20480: Programming in HTML5 with JavaScript and CSS3. Upcoming Dates. Course Description. Course Outline

Web Technologies II + Project Management for Web Applications

Programming in HTML5 with JavaScript and CSS3

Index. Ray Nicholus 2016 R. Nicholus, Beyond jquery, DOI /

TIME SCHEDULE MODULE TOPICS PERIODS. HTML Document Object Model (DOM) and javascript Object Notation (JSON)

Learn Web Development CodersTrust Polska course outline. Hello CodersTrust! Unit 1. HTML Structuring the Web Prerequisites Learning pathway.

JavaScript Specialist v2.0 Exam 1D0-735

,

Introduction to. Maurizio Tesconi May 13, 2015

UI Course HTML: (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) Introduction. The World Wide Web (WWW) and history of HTML

a Very Short Introduction to AngularJS

Part 1: jquery & History of DOM Scripting

jquery Essentials by Marc Grabanski

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains an Individual and Group component

Programming in HTML5 with JavaScript and CSS3

CS7026. Introduction to jquery

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains 2 components

Course 20480: Programming in HTML5 with JavaScript and CSS3

JQuery WHY DIDN T WE LEARN THIS EARLIER??!

55191: Advanced SharePoint Development

JQUERY. jquery is a very popular JavaScript Library. jquery greatly simplifies JavaScript programming. jquery is easy to learn.

Index. Special Characters

SEEM4570 System Design and Implementation Lecture 04 jquery

WELCOME TO JQUERY PROGRAMMING LANGUAGE ONLINE TUTORIAL

jquery Tutorial for Beginners: Nothing But the Goods

Asynchronous JavaScript + XML (Ajax)

20480B: Programming in HTML5 with JavaScript and CSS3

INTERFACE FOUNDATIONS OF WEB DEVELOPMENT

I'm Remy. Who uses jquery.

jquery UI Widget Factory

Programming in HTML5 with JavaScript and CSS3

of numbers, converting into strings, of objects creating, sorting, scrolling images using, sorting, elements of object

Comprehensive AngularJS Programming (5 Days)

2/6/2012. Rich Internet Applications. What is Ajax? Defining AJAX. Asynchronous JavaScript and XML Term coined in 2005 by Jesse James Garrett

Beginning jquery. Course Outline. Beginning jquery. 09 Mar

Session 18. jquery - Ajax. Reference. Tutorials. jquery Methods. Session 18 jquery and Ajax 10/31/ Robert Kelly,

JavaScript, jquery & AJAX

MS_ Programming in HTML5 with JavaScript and CSS3.

webkitpony Documentation

Pro JavaScript. Development. Coding, Capabilities, and Tooling. Den Odell. Apress"

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

THE PRAGMATIC INTRO TO REACT. Clayton Anderson thebhwgroup.com WEB AND MOBILE APP DEVELOPMENT AUSTIN, TX

Prototype Patterns. (c) 2007 Ryan Johnson

Website Development Lecture 18: Working with JQuery ================================================================================== JQuery

JavaScript Programming

Unveiling Zend Studio 8.0

The course is supplemented by numerous hands-on labs that help attendees reinforce their theoretical knowledge of the learned material.

Varargs Training & Software Development Centre Private Limited, Module: HTML5, CSS3 & JavaScript

Ajax and Web 2.0 Related Frameworks and Toolkits. Dennis Chen Director of Product Engineering / Potix Corporation

Full Stack Web Developer

Etanova Enterprise Solutions

Full Stack Web Developer

Prototype Stuart Halloway

AJAX Programming Chris Seddon

JavaScript. jquery and other frameworks. Jacobo Aragunde Pérez. blogs.igalia.com/jaragunde

B. V. Patel Institute of Business Management, Computer & Information Technology, UTU 2014

Java SE7 Fundamentals

UX400. OpenUI5 Development Foundations COURSE OUTLINE. Course Version: 02 Course Duration: 5 Day(s)

Frontend UI Training. Whats App :

jquery to connect with DynamoDB via Lambda API March 9-10, 2017 CS160 Section

Working with Javascript Building Responsive Library apps

Microsoft Programming in HTML5 with JavaScript and CSS3

B. V. Patel Institute of Business Management, Computer & Information Technology, UTU

PHP & PHP++ Curriculum

django-dajax Documentation

Jquery Manually Set Checkbox Checked Or Not

3 Days Training Program

Outline. AJAX for Libraries. Jason A. Clark Head of Digital Access and Web Services Montana State University Libraries

widgetjs Documentation

Client Side JavaScript and AJAX

ASP.NET AJAX adds Asynchronous JavaScript and XML. ASP.NET AJAX was up until the fall of 2006 was known by the code-known of Atlas.

Master Project Software Engineering: Team-based Development WS 2010/11

JavaScript: Events, the DOM Tree, jquery and Timing

welcome to BOILERCAMP HOW TO WEB DEV

Creating Extensions for Safari

Tooling for Ajax-Based Development. Craig R. McClanahan Senior Staff Engineer Sun Microsystems, Inc.

jquery Element & Attribute Selectors, Events, HTML Manipulation, & CSS Manipulation

JavaScript Enlightenment: From Library User To JavaScript Developer By Cody Lindley

Web II CE 2413C 01 CE 2414N 01 Fall 2013

Best Practices Chapter 5

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. jquery

jquery with Fundamentals of JavaScript Training

Transcription:

Prototype jquery To and from JavaScript libraries. Remy Sharp (remysharp.com)

Why Prototype? Extends the DOM and core JavaScript objects An arsenal of utility functions Based on Prototype 1.5.1 & 1.6

Why jquery Centred around chaining and binding methods to objects and elements Totally encapsulated Aims to be exceptionally easy to develop with Based on jquery 1.2.1

Differences in Native Support Prototype has: Class creation Try.these jquery has: No Conflict ($) Effects Position, Range Non-exhaustive list, and in most case, the functionality can be implemented with plugins.

Syntax Comparison

Dollar Variable Prototype uses $ for id based selection jquery $ = CSS based selector (= $$ in Prototype) Note that Prototype will return element objects or arrays of elements for most methods. jquery will usually return a jquery object (which looks like an array in Firebug).

$ Example Prototype $('speech1').show(); jquery $('#speech1').show();

CSS Based Selectors Prototype - $$ To narrow down it's context use Element.getElementsBySelector(selector) (or Element.select(selector) in 1.6) jquery - $ Virtually all of jquery's DOM selection is done using CSS 1-3

Selector Examples Prototype $$('.dialog').invoke( show ); $('final-speech').getelementsbyselector ('DIV.final-dialog').each(Element.hide); // 1.6 $('final-speech').select('div.final- dialog').invoke('hide');

Selector Examples jquery $('.dialog').show(); $('#final-speech DIV.final-dialog').hide();

DOM Ready Event Prototype - uses Event object jquery - uses two types of syntax, both meaning the same thing jquery uses different methods to execute the ready function when the DOM is ready, using specific methods for IE and for Safari (http://tinyurl.com/p9pwe, http://tinyurl.com/2ya35y)

Ready Example Prototype Event.observe(window,'load',function(){}); Prototype 1.6 document.observe('contentloaded', function{}); jquery $(document).ready(function(){}); // or $(function(){});

Iteration Prototype - current active element, and position is passed in to callback function. [el1, el2].each(fn(el, i)) jquery - current element position passed in to callback function, and binds the function to current active element (i.e. this is set to the active element). $([el1, el2]).each(fn(i))

DOM Walking Prototype - up, down, next & previous jquery - parent/s, children, next, prev (& nextall, prevall)

DOM Manipulation Prototype - Insertion class: After, Before, Bottom, Top, update (1.6 will add: Element.insert) jquery - after, before, append, prepend & html

Element Classes Prototype - addclassname, removeclassname, toggleclassname, hasclassname jquery - addclass, removeclass, toggleclass, is (for class matching)

Events Prototype - Event class: observe, stopobserving Prototype 1.6 will support Element.observe jquery - bind, unbind (also supports shortcuts:.click,.dblclick,.mouse*,.ready.,.focus,.blur)

Bubbling Prototype - Event.stop() jquery - return false or event.stoppropagation() (event is passed in to the callback)

Ajax Prototype new Ajax.Request(url[, options]) jquery $.ajax(options) // url included in options

Ajax - Method Comparison Prototype oncreate onsuccess onexception oncomplete jquery beforesend success error complete

Ajax Examples Prototype new Ajax.Request( /profile, { method: post, parameters:$h({ action : check_username, username :$F( username )}), onsuccess: function (j) { // do stuff with response } });

Ajax Examples jquery $.ajax({ url: '/profile', data: {'action':'check_username', 'username': $('#username').val()}, type: 'post', success: function (json) { // do stuff with response } });

Plugins / Extensions Prototype Element.addMethods({myPlugin : function (element, args) { return element; }}); jquery jquery.fn.myplugin = function (args) { return this; };

Browser Detection Prototype - Prototype.Browser.IE,.Webkit, etc. jquery - jquery.browser.msie,.safari, etc.

Resources Prototype jquery API prototypejs.org/api docs.jquery.com/core Tutorials prototypejs.org/learn docs.jquery.com/tutorials Effects script.aculo.us interface.eyecon.ro