Working With Ajax Frameworks
Upcoming SlideShare
Loading in...5
×
 

Working With Ajax Frameworks

on

  • 13,092 views

From Web Directions North 2008, Jonathan Snook compares some of the leading JavaScript Frameworks out there.

From Web Directions North 2008, Jonathan Snook compares some of the leading JavaScript Frameworks out there.

Statistics

Views

Total Views
13,092
Views on SlideShare
11,297
Embed Views
1,795

Actions

Likes
16
Downloads
293
Comments
0

25 Embeds 1,795

http://blog.dreamcss.com 585
http://snook.ca 571
http://www.webdirections.org 251
http://digitta.com 202
http://www.snook.ca 78
http://www.insideria.com 41
http://www.netvibes.com 17
http://www.developria.com 12
http://127.0.0.1 4
http://all-for-women.com 4
http://core.traackr.com 4
http://feeds.feedburner.com 4
http://www.hanrss.com 3
http://static.slideshare.net 3
http://www.slideshare.net 3
http://translate.googleusercontent.com 2
http://insideria.com 2
http://64.233.169.104 2
http://natyuken.slideshow.com 1
http://www.slideshow.com 1
https://redirectit.itelcel.com.keiths-proxy-server.appspot.com 1
http://www.newsalloy.com 1
http://gilgamesh.interinter.net 1
applewebdata://CCEE4D86-24A7-4972-8CC1-43DBD4C0E300 1
applewebdata://99194F19-21AB-4679-947A-3D7BEF373DAA 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Working With Ajax Frameworks Working With Ajax Frameworks Presentation Transcript

  • var Person = Class.create({ initialize: function(name) { this.name = name; }, say: function(message) { return this.name + ': ' + message; } });
  • ['foo', 'bar', 'baz'] .each(function(name, index) { this[name] = index; })
  • ['foo', 'bar', 'baz'] .filter(function(name, index) { return name[0] == 'b' })
  • $A(document.getElementsByTagName('p')).each( function(el){el.className = 'bigpimpin'} )
  • $('p') .addClass('bigpimpin') .html('WDN08FTW!') .click(function(){this.innerHTML = 'no seriously, for the win'});
  • jQuery.fn.newMethod = function(){ return this; };
  • $('.parentElement').hider( { toclick: function(el){ return $('.trigger', el) }, tohide: function(el){ return $('ul', el).hide() }, effect: 'slide' } )
  • jQuery.fn.hider = function(options) { return this.each(function(){ // hide the element and its parent var hide = options.tohide(this); var click = options.toclick ? options.toclick(this) : this; if(options.hide) jQuery(hide).hide(); jQuery(click).click(function() { if(options.effect == 'slide') { jQuery(hide).slideToggle('fast'); }else{ jQuery(hide).animate({opacity:'toggle'},'fast'); } return false; }); }); }
  • var tree = new Ext.tree.TreePanel({ el:'tree', animate:true, autoScroll:true, loader: new Ext.tree.TreeLoader({dataUrl:'/server/script'}), enableDD:true, containerScroll: true, dropConfig: {appendOnly:true} }); // set the root node var root = new Ext.tree.AsyncTreeNode({ text: 'Ext JS', draggable:false, // disable root node dragging id:'source tree.setRootNode(root); // render the tree tree.render(); root.expand(false, /*no anim*/ false);
  • var Person = new Class({ initialize: function(name){ this.name = name; } });
  • <style type=quot;text/cssquot;> @import quot;http://o.aolcdn.com/dojo/1.0.0/dijit/themes/tundra/tundra.cssquot;; @import quot;http://o.aolcdn.com/dojo/1.0.0/dojo/resources/dojo.cssquot; </style> <script type=quot;text/javascriptquot; src=quot;http://o.aolcdn.com/dojo/1.0.0/dojo/dojo.xd.jsquot; djConfig=quot;parseOnLoad: truequot;></script> <script type=quot;text/javascriptquot;> dojo.require(quot;dojo.parserquot;); dojo.require(quot;dijit.form.Buttonquot;); dojo.require(quot;dijit.Menuquot;); function call_function(choice) { console.debug(choice+quot; was clicked.quot;); } </script>
  • <div dojoType=quot;dijit.form.DropDownButtonquot;> <span>Edit</span> <div dojoType=quot;dijit.Menuquot; id=quot;Editquot;> <div dojoType=quot;dijit.MenuItemquot; label=quot;Copyquot; onclick=quot;call_function('copy');quot;></div> <div dojoType=quot;dijit.MenuItemquot; label=quot;Cutquot; onclick=quot;call_function('cut');quot;></div> <div dojoType=quot;dijit.MenuItemquot; label=quot;Pastequot; onclick=quot;call_function('paste');quot;></div> </div> </div>
  • $('elementId').hide(); $('elementId').show();
  • $('#elementId').hide(); $('#elementId').show(); $('#elementId').toggle(); $('#elementId').slideToggle();
  • new Effect.toggle( $('elementID'),'blind')
  • new Ajax.Autocompleter( 'contact_name', 'contact_name_auto_complete', '/server/script', {});
  • new YAHOO.widget.AutoComplete( quot;myInputquot;, quot;myContainerquot;, myDataSource);
  • // An XHR DataSource var myServer = var mySchema = [quot;ResultItemquot;, quot;KeyDataFieldquot;]; var myDataSource = new YAHOO.widget .DS_XHR(myServer, mySchema);
  • new Control.Slider('handle', 'track', { sliderValue:100000, range: $R(10000, 500000), onSlide: function(v) { SB.setBudget(v); } });
  • Shadowbox.lib = { getStyle: function(el, style){ return jQuery(el).css(style); }, }