SlideShare a Scribd company logo
javascript libraries:  jQuery and Prototype
jQuery:  Introduction "jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for  rapid web development ." jquery.com  
jQuery:  A little less information "The Write Less,  Do More , Javascript Library" jquery.com    Lightweight Footprint CSS3 Compliant Cross-Browser Compliant
jQuery:  A business approach Open License     jQuery is currently available for use in all personal or commercial projects under both MIT and GPL licenses. This means that you can choose the license that best suits your project, and use it accordingly.    Ongoing Refinement   jQuery has 5 core teams that  Development Team Evangelist Team jQuery UI Team Plugins Team Web and Design Team   jQuery has an additional unofficial team The web community jQuery extension authors 3rd party contributors  You!
jQuery:  Show me the  money $ The dollar sign   ($)   is  your first step in talking to jQuery   The basics:   CSS selectors            $ ( ".className" ); DOM selectors           $ ( "a" ); classes, methods       $ . fn ();
jQuery:  Where the  action  is $ (). action () $(). action ()   is  how you perform your action on all of your items   *note:  actions  are stackable   *note:  actions  accept arguments and callbacks  Example:   simple fade in                                      $ ( "a" ). fadeIn (); hide, then fade in all anchor tags        $ ( "a" ). hide (). fadeIn (); fade in all anchor tags w/ callback      $ ( "a" ). fadeIn ( 'slow' ,  function (){});
jQuery:  Moving pictures $ (). animate () $(). animate () ;   the key aspect of this function is the object of style properties that will be animated, and to what end.  Animation: Animated effects can be controlled further and customized using jQuery's  $ (). animate ();  method // fade in: same as   $ (). fadeIn ();           $ ( "a" ). animate (      {          "opacity" :1      },      {          "duration" :500      } );    // fade in, change dimensions, left position add a callback  $ ( "a" ). animate (      {            "opacity" :1,          "height" :500,          "width" :400,          "left" :250       },      {          "duration" :500,          "complete" : function (){}       } );
jQuery:  per- form -ing relationship $ ( ":input" ) Collect all your form input fields in one step:  $ ( ":input" )   *more refined selects are available Example:   collect only checkboxes                        $ ( ":checkbox" ); collect only hidden inputs                      $ ( ":hidden" ); collect only text inputs + iterate             $ ( ":text" );
jQuery:  In the  event  of... events jQuery's event system normalizes the event object according to W3C standards. The event object is guaranteed to be passed to the event handler.   *2 approaches exist, direct event, and binding event listeners Example:   perform a click                     $ ( "a" ). click ( function (){ alert ( 'you clinked' )});  bind a click                           $ ( "a" ). bind ( 'click' ,  function (){ alert ( 'you clinked' )}); call that event                      $ ( "a" ). trigger ( 'click' );  // calls #2 unbind that event                 $ ( "a" ). unbind ( 'click' );   *jQuery currently has support for over 39 different events! and that's just the core 
jQuery:  Are you  ready ? events: ready One of the more important events listener / broadcasters that jQuery support is the  ready  event. It truly is about being prepared, and  ready  will tell you when!   Example:   document                     $ ( document ). ready ( function (){ // ready when you are  });  shorthand                     $ ( function (){ // ready when you are  });
jQuery:  extensions : your deadline needn't one $ . extend () Extend one object with one or more others, returning the original, modified, object.   *hang on, this is how jQuery's core works, so...   Let's extend jQuery! // we need an extension that will bold all selected objects $ . extend (      {          bold :  function (obj)          {              $ (obj).each(                  function ()                  {                       $ ( this ). css ({ "font-weight" : "bold" });                  }               )           }      }  ) // usage  $ . bold ( "a" );
jQuery:  express -ions: faster and simpler  $ . expr () We can use  $ . extend  also to extend other objects defined inside of jQuery, eg. to add new selectors:    *hang on, this is how jQuery's core works, so... We've already seen, and used some of jQuery's extension expression method:   $ ( ":input" )   Let's express with jQuery! // we need an expression (filter) that will find all selected objects that are bold  $ . extend (    $ . expr [ ':' ],    {       bold: function (arg)       {         return ( $ (arg). css ( "font-weight" ) ===  "bold" )        }    } ) //usage $ ( ":bold" )
jQuery:  AJAX  - fast data  $ . ajax () jQuery's  $ . ajax  provides a rich and robust method for handling data transport and manipulation. In addition to the low-level  $ . ajax  ( read:   more control ) method, we also have available to use high-level ( read:   quick and dirty ) methods as well, including:  $ . load,  $ . get  and   $ . post Let's take a look! // newsletter opt-in subscriber $ . ajax ( {      url : "http://someurl.com/newsletter.php" ,      cache : false ,      data :{action: "subscribe" ,email: "eugene.andruszczenko@gmail.com" ,name: "eugene" },      dataType : "json" ,     // [xml, html, script, json, jsonp, text]      type : "POST" ,         // [POST, GET, PUT, DELETE]      success :function(response)      {          // response is the data returned: in this case it will be expecting  json  data          // {success:true|false}                },      error :function()      {          // something went wrong!!!      } } )
libraries:  Rapid Development Cheaper, Better & Faster     The case used to be pick two of the above! You can't have all three. Until now!!!   javscript. library  =  { cheaper : true ,  better : true ,  faster : true } This holds true for being able to develop through the use of javascript libraries on the front end. Most common example: Typically in project estimation, there is still a fundamental amount of custom code that needs to be written and allotted for. In addition to that, the time is typically shortened through the process of not deliberating if the project will make use of a javascript library to leverage for your project development, but rather which one!!! As with other development languages, libraries for those languages will create a unified base for developers at all tiers of the projects   backend. developer  <=>  middleware. developer  <=>  frontend. developer
libraries:  Proof of Concept POC not POS     Don't throw away those prototype builds!!!   javscript. library  >>   POC   >>   Production This holds true for being able to develop through the use of javascript libraries on the front end. Most common example: Typically in project estimation, there is still a fundamental amount of custom code that needs to be written and allotted for. In addition to that, the time is typically shortened through the process of not deliberating if the project will make use of a javascript library to leverage for your project development, but rather which one!!! As with other development languages, libraries for those languages will create a unified base for developers at all tiers of the projects   backend. developer  <=>  middleware. developer  <=>  frontend. developer
libraries:  Studio Approach Easy to interpret     Through exposure and usage, a common language  (code & spoken)  will typically evolve within any size of given studio where developers, designer and the like work together on projects   designer . idea  =  developer . code  =   client .satisfaction Communication barriers fall and ideas blossom as to the handling of effects, motion, manipulation. If you are a  designer , how many times have you asked something similar to:  Can't you just make it slide up and fade at the same time?   If you are a  designer , how many times have you been asked similarly:  Make it slide up and fade at the same time? With the most common functionality already handled by most javascript framework, the guess work, browser compliance, backwards compatibility...    ...big list of client requirements  (are you still paying attention) ...    ...these now become and extension of your code without deteriorating the core intentions
libraries:  ROI Return on Investment   Othe than the $ being standard notation for both jQuery and Prototype there is it's literal interpretation...   ...$ the dollar sign!!!   javscript. library  =  { free : true ,  margin : true ,  profit : true } How it's done! Under both MIT and GPL licenses. This means that you can choose the license that best suits your project, and use it accordingly. Learning is easy! Both libraries leverage HTML and CSS (Cascading Style Sheets) knowledge as a stepping stone into javascript library usage. Getting your feet wet does not require expert knowledge of javascript. Additionally, these libraries provide a  framework unification  of  CSS, DOM (document object model) and javascript , providing and enabling even non developers to create proof of concept work! Recently javascript library support has been introduced in Adobe's Dreamweaver CS3 (through extensions) and is fully supported in CS4. Pick your library, highlight your object, pick your action(), done! Code hinting and coloring also supported.
libraries:  Out of the basement Real world libraries, Real world clients   Tech Google BIM Dell Intel AOL Oracle News BBC NBC BusinessWeek Newsweek Reuturs CBS News Sales|Services NBC Amazon NetFlix SalesForce Dominos US Airways Prototype jQuery Tech Apple Tivo NASA Microsoft  News NBC CNN.com ESPN Globe and Mail Sales|Services eBay H&M Sony DropSend Other Ruby on Rails
Thanks:  So long and thanks for all the  $ $ . thanks () The obligatory (often overlooked) thank you page   *copy, paste, and run!   // we need an extension that will bold all selected objects <script src=&quot;http://jqueryjs.googlecode.com/files/jquery-1.2.3.min.js&quot; type=&quot;text/javascript&quot;></script>     <script> $.extend(     {         thanks:function(obj){$(obj).each(function(i){             var text    = this.toString();             setTimeout(function(){var li    = $(document.createElement(&quot;li&quot;));li.text(text).hide().fadeIn('slow');$(&quot;body&quot;).append(li);},(i * 1000))         })}     } );          $(document).ready(function(){     $.thanks(         [&quot;refresh events&quot;, &quot;justin kuzoch&quot;,    &quot;centre for social innovation&quot;,    &quot;YOU&quot;]     )         }) </script> <body><h1>big thanks to:</h1></body>

More Related Content

What's hot (20)

KEY
jQuery Anti-Patterns for Performance & Compression
Paul Irish
 
PPT
JavaScript Needn't Hurt!
Thomas Kjeldahl Nilsson
 
PPT
Lecture 3 Javascript1
Sur College of Applied Sciences
 
PPT
Jquery 1
Manish Kumar Singh
 
PDF
WordCamp ABQ 2013: Making the leap from Designer to Designer/Developer
my easel
 
PPT
AJAX Workshop Notes
Pamela Fox
 
PDF
Wordcamp abq cf-cpt
my easel
 
PPT
Learn javascript easy steps
prince Loffar
 
PPT
Pragmatics of Declarative Ajax
davejohnson
 
ZIP
Fundamental JavaScript [In Control 2009]
Aaron Gustafson
 
PPT
Architecture | Busy Java Developers Guide to NoSQL | Ted Neward
JAX London
 
PPT
Java script
Soham Sengupta
 
PPT
Javascript and Jquery Best practices
Sultan Khan
 
RTF
Java scripts
Capgemini India
 
PPT
Scripting The Dom
Ara Pehlivanian
 
PPT
Rich faces
BG Java EE Course
 
PPT
jQuery introduction
Tomi Juhola
 
DOC
Basics java scripts
ch samaram
 
PDF
Qpsmtpd
Fred Moyer
 
PPT
Introduction to Prototype JS Framework
Mohd Imran
 
jQuery Anti-Patterns for Performance & Compression
Paul Irish
 
JavaScript Needn't Hurt!
Thomas Kjeldahl Nilsson
 
Lecture 3 Javascript1
Sur College of Applied Sciences
 
Jquery 1
Manish Kumar Singh
 
WordCamp ABQ 2013: Making the leap from Designer to Designer/Developer
my easel
 
AJAX Workshop Notes
Pamela Fox
 
Wordcamp abq cf-cpt
my easel
 
Learn javascript easy steps
prince Loffar
 
Pragmatics of Declarative Ajax
davejohnson
 
Fundamental JavaScript [In Control 2009]
Aaron Gustafson
 
Architecture | Busy Java Developers Guide to NoSQL | Ted Neward
JAX London
 
Java script
Soham Sengupta
 
Javascript and Jquery Best practices
Sultan Khan
 
Java scripts
Capgemini India
 
Scripting The Dom
Ara Pehlivanian
 
Rich faces
BG Java EE Course
 
jQuery introduction
Tomi Juhola
 
Basics java scripts
ch samaram
 
Qpsmtpd
Fred Moyer
 
Introduction to Prototype JS Framework
Mohd Imran
 

Similar to Eugene Andruszczenko: jQuery (20)

PPT
jQuery Fundamentals
Doncho Minkov
 
PPTX
J Query Presentation
Vishal Kumar
 
PPT
J Query
ravinxg
 
PPT
Introduction to JQuery
MobME Technical
 
PPT
JQuery: Introduction
Amit Kumar Singh
 
PPT
jQuery and_drupal
BlackCatWeb
 
PPT
JavaScript & Dom Manipulation
Mohammed Arif
 
PPT
eXo SEA - JavaScript Introduction Training
Hoat Le
 
PPTX
Intro to jQuery
Eric Steinborn
 
PPT
JavaScript 2.0 in Dreamweaver CS4
alexsaves
 
PPTX
jQuery
Vishwa Mohan
 
ODP
Implementing Comet using PHP
King Foo
 
PPT
Grails Introduction - IJTC 2007
Guillaume Laforge
 
PPT
jQuery
Mohammed Arif
 
PPT
jQuery Performance Rules
nagarajhubli
 
PPT
Javascript
mussawir20
 
PPS
Advisor Jumpstart: JavaScript
dominion
 
PPT
Jqueryforbeginnersjqueryconference2009 090914063709 Phpapp02
careersblog
 
PPTX
Basics of Ext JS
ikhwanhayat
 
ODP
ActiveWeb: Chicago Java User Group Presentation
ipolevoy
 
jQuery Fundamentals
Doncho Minkov
 
J Query Presentation
Vishal Kumar
 
J Query
ravinxg
 
Introduction to JQuery
MobME Technical
 
JQuery: Introduction
Amit Kumar Singh
 
jQuery and_drupal
BlackCatWeb
 
JavaScript & Dom Manipulation
Mohammed Arif
 
eXo SEA - JavaScript Introduction Training
Hoat Le
 
Intro to jQuery
Eric Steinborn
 
JavaScript 2.0 in Dreamweaver CS4
alexsaves
 
jQuery
Vishwa Mohan
 
Implementing Comet using PHP
King Foo
 
Grails Introduction - IJTC 2007
Guillaume Laforge
 
jQuery
Mohammed Arif
 
jQuery Performance Rules
nagarajhubli
 
Javascript
mussawir20
 
Advisor Jumpstart: JavaScript
dominion
 
Jqueryforbeginnersjqueryconference2009 090914063709 Phpapp02
careersblog
 
Basics of Ext JS
ikhwanhayat
 
ActiveWeb: Chicago Java User Group Presentation
ipolevoy
 
Ad

More from Refresh Events (20)

PPTX
Tamera Kremer - The Social Tools Won't Save You
Refresh Events
 
PPT
Aubrey Podolsky - Sysomos' Social Media Tools and How To Use Them
Refresh Events
 
PPT
Lynette Latinsky - Can Lunch Be On Me Today?
Refresh Events
 
PPT
Michael Burke
Refresh Events
 
KEY
Tim Scollick - Flex, Seo And You
Refresh Events
 
KEY
Joshua Wehner - Tomorrows Programming Languages Today
Refresh Events
 
PPTX
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Refresh Events
 
PDF
Ben Vinegar - 5 Tips For Better Javascript Applications
Refresh Events
 
PPT
Jonathan Dunn - Talking You Down from the Bleeding Edge
Refresh Events
 
KEY
Justin Kozuch - Lessons Learned In Community Building
Refresh Events
 
PPT
Jenmy Huynh - Finding Opportunities
Refresh Events
 
PPTX
Adil Dhalla - My City Lives
Refresh Events
 
PPT
Andy Walker - Little Geeks Foundation
Refresh Events
 
PPTX
Satish Kanwar - Entrepreneur Versus Employee
Refresh Events
 
KEY
Jason Schneider - What The Font?
Refresh Events
 
KEY
Dre Labre - The Game Of Opposites
Refresh Events
 
PPTX
Evelyn So - A Few Social Media Stories
Refresh Events
 
PPT
Daniel Patricio: I Hope Mobile Kills Advertising
Refresh Events
 
PPT
Tom Purves: Designing for An Augmented Reality World
Refresh Events
 
PPT
Jason Sadler: I Wear Your Shirt
Refresh Events
 
Tamera Kremer - The Social Tools Won't Save You
Refresh Events
 
Aubrey Podolsky - Sysomos' Social Media Tools and How To Use Them
Refresh Events
 
Lynette Latinsky - Can Lunch Be On Me Today?
Refresh Events
 
Michael Burke
Refresh Events
 
Tim Scollick - Flex, Seo And You
Refresh Events
 
Joshua Wehner - Tomorrows Programming Languages Today
Refresh Events
 
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Refresh Events
 
Ben Vinegar - 5 Tips For Better Javascript Applications
Refresh Events
 
Jonathan Dunn - Talking You Down from the Bleeding Edge
Refresh Events
 
Justin Kozuch - Lessons Learned In Community Building
Refresh Events
 
Jenmy Huynh - Finding Opportunities
Refresh Events
 
Adil Dhalla - My City Lives
Refresh Events
 
Andy Walker - Little Geeks Foundation
Refresh Events
 
Satish Kanwar - Entrepreneur Versus Employee
Refresh Events
 
Jason Schneider - What The Font?
Refresh Events
 
Dre Labre - The Game Of Opposites
Refresh Events
 
Evelyn So - A Few Social Media Stories
Refresh Events
 
Daniel Patricio: I Hope Mobile Kills Advertising
Refresh Events
 
Tom Purves: Designing for An Augmented Reality World
Refresh Events
 
Jason Sadler: I Wear Your Shirt
Refresh Events
 
Ad

Recently uploaded (20)

PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 

Eugene Andruszczenko: jQuery

  • 1. javascript libraries: jQuery and Prototype
  • 2. jQuery: Introduction &quot;jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development .&quot; jquery.com  
  • 3. jQuery: A little less information &quot;The Write Less, Do More , Javascript Library&quot; jquery.com   Lightweight Footprint CSS3 Compliant Cross-Browser Compliant
  • 4. jQuery: A business approach Open License   jQuery is currently available for use in all personal or commercial projects under both MIT and GPL licenses. This means that you can choose the license that best suits your project, and use it accordingly.   Ongoing Refinement   jQuery has 5 core teams that  Development Team Evangelist Team jQuery UI Team Plugins Team Web and Design Team   jQuery has an additional unofficial team The web community jQuery extension authors 3rd party contributors You!
  • 5. jQuery: Show me the money $ The dollar sign ($) is your first step in talking to jQuery   The basics:   CSS selectors           $ ( &quot;.className&quot; ); DOM selectors          $ ( &quot;a&quot; ); classes, methods      $ . fn ();
  • 6. jQuery: Where the action is $ (). action () $(). action () is how you perform your action on all of your items   *note: actions are stackable   *note: actions accept arguments and callbacks Example:   simple fade in                                     $ ( &quot;a&quot; ). fadeIn (); hide, then fade in all anchor tags       $ ( &quot;a&quot; ). hide (). fadeIn (); fade in all anchor tags w/ callback     $ ( &quot;a&quot; ). fadeIn ( 'slow' , function (){});
  • 7. jQuery: Moving pictures $ (). animate () $(). animate () ;  the key aspect of this function is the object of style properties that will be animated, and to what end. Animation: Animated effects can be controlled further and customized using jQuery's $ (). animate (); method // fade in: same as  $ (). fadeIn ();         $ ( &quot;a&quot; ). animate (      {          &quot;opacity&quot; :1      },      {          &quot;duration&quot; :500      } );   // fade in, change dimensions, left position add a callback  $ ( &quot;a&quot; ). animate (      {            &quot;opacity&quot; :1,         &quot;height&quot; :500,         &quot;width&quot; :400,         &quot;left&quot; :250      },      {          &quot;duration&quot; :500,         &quot;complete&quot; : function (){}      } );
  • 8. jQuery: per- form -ing relationship $ ( &quot;:input&quot; ) Collect all your form input fields in one step: $ ( &quot;:input&quot; )   *more refined selects are available Example:   collect only checkboxes                       $ ( &quot;:checkbox&quot; ); collect only hidden inputs                     $ ( &quot;:hidden&quot; ); collect only text inputs + iterate            $ ( &quot;:text&quot; );
  • 9. jQuery: In the event of... events jQuery's event system normalizes the event object according to W3C standards. The event object is guaranteed to be passed to the event handler.   *2 approaches exist, direct event, and binding event listeners Example:   perform a click                    $ ( &quot;a&quot; ). click ( function (){ alert ( 'you clinked' )}); bind a click                          $ ( &quot;a&quot; ). bind ( 'click' , function (){ alert ( 'you clinked' )}); call that event                     $ ( &quot;a&quot; ). trigger ( 'click' ); // calls #2 unbind that event                $ ( &quot;a&quot; ). unbind ( 'click' );   *jQuery currently has support for over 39 different events! and that's just the core 
  • 10. jQuery: Are you ready ? events: ready One of the more important events listener / broadcasters that jQuery support is the ready event. It truly is about being prepared, and ready will tell you when!   Example:   document                    $ ( document ). ready ( function (){ // ready when you are }); shorthand                    $ ( function (){ // ready when you are });
  • 11. jQuery: extensions : your deadline needn't one $ . extend () Extend one object with one or more others, returning the original, modified, object.   *hang on, this is how jQuery's core works, so...   Let's extend jQuery! // we need an extension that will bold all selected objects $ . extend (     {         bold : function (obj)          {             $ (obj).each(                 function ()                 {                      $ ( this ). css ({ &quot;font-weight&quot; : &quot;bold&quot; });                  }             )         }     } ) // usage $ . bold ( &quot;a&quot; );
  • 12. jQuery: express -ions: faster and simpler $ . expr () We can use $ . extend also to extend other objects defined inside of jQuery, eg. to add new selectors:   *hang on, this is how jQuery's core works, so... We've already seen, and used some of jQuery's extension expression method: $ ( &quot;:input&quot; )   Let's express with jQuery! // we need an expression (filter) that will find all selected objects that are bold $ . extend (   $ . expr [ ':' ],   {      bold: function (arg)      {        return ( $ (arg). css ( &quot;font-weight&quot; ) === &quot;bold&quot; )      }   } ) //usage $ ( &quot;:bold&quot; )
  • 13. jQuery:  AJAX - fast data $ . ajax () jQuery's $ . ajax provides a rich and robust method for handling data transport and manipulation. In addition to the low-level $ . ajax ( read: more control ) method, we also have available to use high-level ( read: quick and dirty ) methods as well, including: $ . load, $ . get and $ . post Let's take a look! // newsletter opt-in subscriber $ . ajax ( {      url : &quot;http://someurl.com/newsletter.php&quot; ,     cache : false ,     data :{action: &quot;subscribe&quot; ,email: &quot;[email protected]&quot; ,name: &quot;eugene&quot; },     dataType : &quot;json&quot; ,     // [xml, html, script, json, jsonp, text]     type : &quot;POST&quot; ,        // [POST, GET, PUT, DELETE]     success :function(response)     {         // response is the data returned: in this case it will be expecting json data         // {success:true|false}              },     error :function()     {         // something went wrong!!!     } } )
  • 14. libraries: Rapid Development Cheaper, Better & Faster   The case used to be pick two of the above! You can't have all three. Until now!!!   javscript. library = { cheaper : true , better : true , faster : true } This holds true for being able to develop through the use of javascript libraries on the front end. Most common example: Typically in project estimation, there is still a fundamental amount of custom code that needs to be written and allotted for. In addition to that, the time is typically shortened through the process of not deliberating if the project will make use of a javascript library to leverage for your project development, but rather which one!!! As with other development languages, libraries for those languages will create a unified base for developers at all tiers of the projects   backend. developer <=> middleware. developer <=> frontend. developer
  • 15. libraries: Proof of Concept POC not POS   Don't throw away those prototype builds!!!   javscript. library >> POC >> Production This holds true for being able to develop through the use of javascript libraries on the front end. Most common example: Typically in project estimation, there is still a fundamental amount of custom code that needs to be written and allotted for. In addition to that, the time is typically shortened through the process of not deliberating if the project will make use of a javascript library to leverage for your project development, but rather which one!!! As with other development languages, libraries for those languages will create a unified base for developers at all tiers of the projects   backend. developer <=> middleware. developer <=> frontend. developer
  • 16. libraries: Studio Approach Easy to interpret   Through exposure and usage, a common language (code & spoken) will typically evolve within any size of given studio where developers, designer and the like work together on projects   designer . idea = developer . code = client .satisfaction Communication barriers fall and ideas blossom as to the handling of effects, motion, manipulation. If you are a designer , how many times have you asked something similar to:  Can't you just make it slide up and fade at the same time?   If you are a designer , how many times have you been asked similarly:  Make it slide up and fade at the same time? With the most common functionality already handled by most javascript framework, the guess work, browser compliance, backwards compatibility...    ...big list of client requirements (are you still paying attention) ...   ...these now become and extension of your code without deteriorating the core intentions
  • 17. libraries: ROI Return on Investment   Othe than the $ being standard notation for both jQuery and Prototype there is it's literal interpretation...   ...$ the dollar sign!!!   javscript. library = { free : true , margin : true , profit : true } How it's done! Under both MIT and GPL licenses. This means that you can choose the license that best suits your project, and use it accordingly. Learning is easy! Both libraries leverage HTML and CSS (Cascading Style Sheets) knowledge as a stepping stone into javascript library usage. Getting your feet wet does not require expert knowledge of javascript. Additionally, these libraries provide a framework unification of CSS, DOM (document object model) and javascript , providing and enabling even non developers to create proof of concept work! Recently javascript library support has been introduced in Adobe's Dreamweaver CS3 (through extensions) and is fully supported in CS4. Pick your library, highlight your object, pick your action(), done! Code hinting and coloring also supported.
  • 18. libraries: Out of the basement Real world libraries, Real world clients Tech Google BIM Dell Intel AOL Oracle News BBC NBC BusinessWeek Newsweek Reuturs CBS News Sales|Services NBC Amazon NetFlix SalesForce Dominos US Airways Prototype jQuery Tech Apple Tivo NASA Microsoft News NBC CNN.com ESPN Globe and Mail Sales|Services eBay H&M Sony DropSend Other Ruby on Rails
  • 19. Thanks: So long and thanks for all the $ $ . thanks () The obligatory (often overlooked) thank you page   *copy, paste, and run!   // we need an extension that will bold all selected objects <script src=&quot;http://jqueryjs.googlecode.com/files/jquery-1.2.3.min.js&quot; type=&quot;text/javascript&quot;></script>     <script> $.extend(     {         thanks:function(obj){$(obj).each(function(i){             var text    = this.toString();             setTimeout(function(){var li    = $(document.createElement(&quot;li&quot;));li.text(text).hide().fadeIn('slow');$(&quot;body&quot;).append(li);},(i * 1000))         })}     } );         $(document).ready(function(){     $.thanks(         [&quot;refresh events&quot;, &quot;justin kuzoch&quot;,    &quot;centre for social innovation&quot;,    &quot;YOU&quot;]     )        }) </script> <body><h1>big thanks to:</h1></body>

Editor's Notes

  • #2: Welcome and introduction