SlideShare a Scribd company logo
1 of 54
Download to read offline
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);
  },

}
Working With Ajax Frameworks
Working With Ajax Frameworks

More Related Content

What's hot

Introduction to Service Worker
Introduction to Service WorkerIntroduction to Service Worker
Introduction to Service WorkerShogo Sensui
 
jQuery for designers
jQuery for designersjQuery for designers
jQuery for designersJohan Ronsse
 
Symfony2でMongoDBと仲良くする方法
Symfony2でMongoDBと仲良くする方法Symfony2でMongoDBと仲良くする方法
Symfony2でMongoDBと仲良くする方法Koji Iwazaki
 
Palestra sobre MongoDB com PHP no PHP'n'Rio
Palestra sobre MongoDB com PHP no PHP'n'Rio Palestra sobre MongoDB com PHP no PHP'n'Rio
Palestra sobre MongoDB com PHP no PHP'n'Rio Suissa
 
Formulario
FormularioFormulario
Formulariotukisele
 
Php codigos interfaces fredy guzman cusihunca
Php codigos interfaces   fredy guzman cusihuncaPhp codigos interfaces   fredy guzman cusihunca
Php codigos interfaces fredy guzman cusihuncaTigger_Fred
 
Java Script - Object-Oriented Programming
Java Script - Object-Oriented ProgrammingJava Script - Object-Oriented Programming
Java Script - Object-Oriented Programmingintive
 
Simular un next del recordset en php de forma rudimentaria
Simular un next del recordset en php de forma rudimentariaSimular un next del recordset en php de forma rudimentaria
Simular un next del recordset en php de forma rudimentariajbersosa
 
Jquery Introduction Hebrew
Jquery Introduction HebrewJquery Introduction Hebrew
Jquery Introduction HebrewAlex Ivy
 
JS programowanie obiektowe
JS  programowanie obiektoweJS  programowanie obiektowe
JS programowanie obiektowePiotr Czajkowski
 
Юнит тестирование в Zend Framework 2.0
Юнит тестирование в Zend Framework 2.0Юнит тестирование в Zend Framework 2.0
Юнит тестирование в Zend Framework 2.0zfconfua
 
jQuery sans jQuery
jQuery sans jQueryjQuery sans jQuery
jQuery sans jQuerygoldoraf
 
Dennis zapana perez
Dennis zapana perezDennis zapana perez
Dennis zapana perezdennis_elvis
 
Crud secara simultan ala php myadmin
Crud secara simultan ala php myadminCrud secara simultan ala php myadmin
Crud secara simultan ala php myadminRizal Di Caprio
 

What's hot (20)

Introduction to Service Worker
Introduction to Service WorkerIntroduction to Service Worker
Introduction to Service Worker
 
Clase 10 electiva profesional 3 aws rds php y mysql
Clase 10 electiva profesional 3 aws rds php y mysqlClase 10 electiva profesional 3 aws rds php y mysql
Clase 10 electiva profesional 3 aws rds php y mysql
 
jQuery for designers
jQuery for designersjQuery for designers
jQuery for designers
 
Local storages
Local storagesLocal storages
Local storages
 
Symfony2でMongoDBと仲良くする方法
Symfony2でMongoDBと仲良くする方法Symfony2でMongoDBと仲良くする方法
Symfony2でMongoDBと仲良くする方法
 
Palestra sobre MongoDB com PHP no PHP'n'Rio
Palestra sobre MongoDB com PHP no PHP'n'Rio Palestra sobre MongoDB com PHP no PHP'n'Rio
Palestra sobre MongoDB com PHP no PHP'n'Rio
 
Formulario
FormularioFormulario
Formulario
 
Php codigos interfaces fredy guzman cusihunca
Php codigos interfaces   fredy guzman cusihuncaPhp codigos interfaces   fredy guzman cusihunca
Php codigos interfaces fredy guzman cusihunca
 
Java Script - Object-Oriented Programming
Java Script - Object-Oriented ProgrammingJava Script - Object-Oriented Programming
Java Script - Object-Oriented Programming
 
With enter
With enterWith enter
With enter
 
Simular un next del recordset en php de forma rudimentaria
Simular un next del recordset en php de forma rudimentariaSimular un next del recordset en php de forma rudimentaria
Simular un next del recordset en php de forma rudimentaria
 
Wek14 mysql 2
Wek14 mysql 2Wek14 mysql 2
Wek14 mysql 2
 
Jquery Introduction Hebrew
Jquery Introduction HebrewJquery Introduction Hebrew
Jquery Introduction Hebrew
 
JS programowanie obiektowe
JS  programowanie obiektoweJS  programowanie obiektowe
JS programowanie obiektowe
 
Юнит тестирование в Zend Framework 2.0
Юнит тестирование в Zend Framework 2.0Юнит тестирование в Zend Framework 2.0
Юнит тестирование в Zend Framework 2.0
 
jQuery sans jQuery
jQuery sans jQueryjQuery sans jQuery
jQuery sans jQuery
 
Custom agario skins
Custom agario skinsCustom agario skins
Custom agario skins
 
Dennis zapana perez
Dennis zapana perezDennis zapana perez
Dennis zapana perez
 
Crud secara simultan ala php myadmin
Crud secara simultan ala php myadminCrud secara simultan ala php myadmin
Crud secara simultan ala php myadmin
 
Iteratory
IteratoryIteratory
Iteratory
 

Viewers also liked

The Type We Want (MIX10)
The Type We Want (MIX10)The Type We Want (MIX10)
The Type We Want (MIX10)Jonathan Snook
 
Mobile Web Development
Mobile Web DevelopmentMobile Web Development
Mobile Web DevelopmentJonathan Snook
 
Presentation on Presentations
Presentation on PresentationsPresentation on Presentations
Presentation on PresentationsJonathan Snook
 
Building On The Shoulders
Building On The ShouldersBuilding On The Shoulders
Building On The ShouldersJonathan Snook
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slidesSmithss25
 
Mobile Is Eating the World, 2016-2017
Mobile Is Eating the World, 2016-2017Mobile Is Eating the World, 2016-2017
Mobile Is Eating the World, 2016-2017a16z
 
Go-to-Market Best Practices for Startups
Go-to-Market Best Practices for StartupsGo-to-Market Best Practices for Startups
Go-to-Market Best Practices for Startupsa16z
 
Software is Eating Bio
Software is Eating BioSoftware is Eating Bio
Software is Eating Bioa16z
 
Go to-market strategy for B2B SaaS companies
Go to-market strategy for B2B SaaS companiesGo to-market strategy for B2B SaaS companies
Go to-market strategy for B2B SaaS companiesGuillaume Lerouge
 
Network Effects
Network EffectsNetwork Effects
Network Effectsa16z
 
Mobile Is Eating the World (2016)
Mobile Is Eating the World (2016)Mobile Is Eating the World (2016)
Mobile Is Eating the World (2016)a16z
 

Viewers also liked (15)

The Type We Want (MIX10)
The Type We Want (MIX10)The Type We Want (MIX10)
The Type We Want (MIX10)
 
Mobile Web Development
Mobile Web DevelopmentMobile Web Development
Mobile Web Development
 
Presentation on Presentations
Presentation on PresentationsPresentation on Presentations
Presentation on Presentations
 
Building On The Shoulders
Building On The ShouldersBuilding On The Shoulders
Building On The Shoulders
 
RIAs
RIAsRIAs
RIAs
 
The Type We Want
The Type We WantThe Type We Want
The Type We Want
 
Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slides
 
Mobile Is Eating the World, 2016-2017
Mobile Is Eating the World, 2016-2017Mobile Is Eating the World, 2016-2017
Mobile Is Eating the World, 2016-2017
 
Go-to-Market Best Practices for Startups
Go-to-Market Best Practices for StartupsGo-to-Market Best Practices for Startups
Go-to-Market Best Practices for Startups
 
Software is Eating Bio
Software is Eating BioSoftware is Eating Bio
Software is Eating Bio
 
Go to-market strategy for B2B SaaS companies
Go to-market strategy for B2B SaaS companiesGo to-market strategy for B2B SaaS companies
Go to-market strategy for B2B SaaS companies
 
Network Effects
Network EffectsNetwork Effects
Network Effects
 
Mobile Is Eating the World (2016)
Mobile Is Eating the World (2016)Mobile Is Eating the World (2016)
Mobile Is Eating the World (2016)
 
SlideShare 101
SlideShare 101SlideShare 101
SlideShare 101
 

Working With Ajax Frameworks

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. var Person = Class.create({ initialize: function(name) { this.name = name; }, say: function(message) { return this.name + ': ' + message; } });
  • 11. ['foo', 'bar', 'baz'] .each(function(name, index) { this[name] = index; })
  • 12. ['foo', 'bar', 'baz'] .filter(function(name, index) { return name[0] == 'b' })
  • 14.
  • 15.
  • 16. $('p') .addClass('bigpimpin') .html('WDN08FTW!') .click(function(){this.innerHTML = 'no seriously, for the win'});
  • 18. $('.parentElement').hider( { toclick: function(el){ return $('.trigger', el) }, tohide: function(el){ return $('ul', el).hide() }, effect: 'slide' } )
  • 19. 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; }); }); }
  • 20.
  • 21.
  • 22.
  • 23. 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);
  • 24.
  • 25.
  • 26.
  • 27. var Person = new Class({ initialize: function(name){ this.name = name; } });
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35. <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>
  • 36. <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>
  • 37.
  • 38.
  • 40. $('#elementId').hide(); $('#elementId').show(); $('#elementId').toggle(); $('#elementId').slideToggle();
  • 42.
  • 43. new Ajax.Autocompleter( 'contact_name', 'contact_name_auto_complete', '/server/script', {});
  • 44. new YAHOO.widget.AutoComplete( quot;myInputquot;, quot;myContainerquot;, myDataSource);
  • 45. // An XHR DataSource var myServer = var mySchema = [quot;ResultItemquot;, quot;KeyDataFieldquot;]; var myDataSource = new YAHOO.widget .DS_XHR(myServer, mySchema);
  • 46.
  • 47.
  • 48. new Control.Slider('handle', 'track', { sliderValue:100000, range: $R(10000, 500000), onSlide: function(v) { SB.setBudget(v); } });
  • 49.
  • 50.
  • 51.
  • 52. Shadowbox.lib = { getStyle: function(el, style){ return jQuery(el).css(style); }, }