SlideShare a Scribd company logo
1 of 9
Download to read offline
jQuery
ajax & plugins




Inbal Geffen
ajax before jQuery
      function getXMLHttp()
      {      var xmlHttp;
             if (window.XMLHttpRequest) { // Mozilla, Safari, ...
                       var xmlHttp = new XMLHttpRequest();
                 }
             else if (window.ActiveXObject) { // IE
                      var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
               }
                 return xmlHttp;
      }

      function MakeRequest()
      {        var xmlHttp = getXMLHttp();
               xmlHttp.onreadystatechange = function()
               {
                 if(xmlHttp.readyState == 4)
                 {
                         HandleResponse(xmlHttp.responseText);
                 }
               }
               xmlHttp.open("GET", "ajax.php", true);
               xmlHttp.send();
             }

      function HandleResponse(response) { document.getElementById('ResponseDiv').innerHTML = response;}



Inbal Geffen
ajax using jQuery - $.post

          function MakeRequest() {
           var url = "ajax.php";
           $.post(url, ' ' ,function(data) {
             $("#ResponseDiv").html(data).show();
           });
      }




Inbal Geffen
ajax using jQuery - $.get

          function MakeRequest() {
           var url = "ajax.php";
           $.get(url, ' ' ,function(data) {
             $("#ResponseDiv").html(data).show();
           });
      }




Inbal Geffen
ajax using jQuery - $.ajax

       function MakeRequest() {
      $.ajax({
      type: "GET",
      url: "ajax.php",
      success: function (result) {
           $("#ResponseDiv").html(result);
      },
      error: function (error) {
      alert(error);
      }
      });
      }

Inbal Geffen
jQuery plugins
       ●       Many plugins exist in the web

       ●       http://archive.plugins.jquery.com - main jQuery plugins archive

       ●       Plugins usually include instructions and example code for how to use them

       ●       http://www.simplefadeslideshow.com/

       ●       http://tympanus.net/codrops/2012/09/03/bookblock-a-content-flip-plugin/

       ●       http://plugins.in1.com/socialist/demo

       ●       http://nbartlomiej.github.com/foggy/

       ●       http://tsvensen.github.com/equalize.js/

Inbal Geffen
jQuery plugins
      <!--Add the jQuery.js and the plugin.js-->

      <head>
      <title>Example</title>
      <script src="jquery.js" type="text/javascript"></script>
      <script src="jquery.plugin.js" type="text/javascript"></script>
      </head>

      <!--Carousel example Add the jQuery.js and the plugin.js-->

      <script src="js/jquery-1.7.min.js" type="text/javascript" charset="utf-8"></script>
      <script src="js/jquery.featureCarousel.min.js" type="text/javascript" charset="utf-8"
      ></script>




Inbal Geffen
jQuery plugins
      <!--For each image we want to add to the carousel we need to add this kind of div-->

      <div class="carousel-feature">
           <img class="carousel-image" src="images/flowers1.jpg" alt="Image1" />
           <div class="carousel-caption">
                <p>Amazing flower</p>
           </div>
      </div>




Inbal Geffen
jQuery plugins
      <!--All divs need to be nested under div with id="carousel" -->

      <body>
      <div id="carousel-container">
           <div id="carousel">
                <div class="carousel-feature">
                      <img class="carousel-image" src="images/flowers1.jpg" alt="Image1" />
                      <div class="carousel-caption">
                           <p>Amazing flower</p>
                      </div>
                </div>
                <div class="carousel-feature">
                .....
           </div>
      </div>
      </body>
Inbal Geffen

More Related Content

What's hot

Sprout core and performance
Sprout core and performanceSprout core and performance
Sprout core and performance
Yehuda Katz
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Tree
adamlogic
 
Jquery Plugin
Jquery PluginJquery Plugin
Jquery Plugin
Ravi Mone
 
JAVASCRIPT NÃO-OBSTRUTIVO com jQuery
JAVASCRIPT NÃO-OBSTRUTIVO com jQueryJAVASCRIPT NÃO-OBSTRUTIVO com jQuery
JAVASCRIPT NÃO-OBSTRUTIVO com jQuery
Zigotto Tecnologia
 

What's hot (20)

Introducing jQuery
Introducing jQueryIntroducing jQuery
Introducing jQuery
 
Sprout core and performance
Sprout core and performanceSprout core and performance
Sprout core and performance
 
Dart and AngularDart
Dart and AngularDartDart and AngularDart
Dart and AngularDart
 
AngulrJS Overview
AngulrJS OverviewAngulrJS Overview
AngulrJS Overview
 
Aplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com BackboneAplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com Backbone
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Tree
 
Angular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.xAngular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.x
 
PHPConf-TW 2012 # Twig
PHPConf-TW 2012 # TwigPHPConf-TW 2012 # Twig
PHPConf-TW 2012 # Twig
 
jQuery Best Practice
jQuery Best Practice jQuery Best Practice
jQuery Best Practice
 
Ruby - Design patterns tdc2011
Ruby - Design patterns tdc2011Ruby - Design patterns tdc2011
Ruby - Design patterns tdc2011
 
Utilization of zend an ultimate alternate for intense data processing
Utilization of zend  an ultimate alternate for intense data processingUtilization of zend  an ultimate alternate for intense data processing
Utilization of zend an ultimate alternate for intense data processing
 
WordPress Kitchen 2014 - Александр Стриха: Кеширование в WordPress
WordPress Kitchen 2014 - Александр Стриха: Кеширование в WordPress WordPress Kitchen 2014 - Александр Стриха: Кеширование в WordPress
WordPress Kitchen 2014 - Александр Стриха: Кеширование в WordPress
 
JQuery In Drupal
JQuery In DrupalJQuery In Drupal
JQuery In Drupal
 
Jquery plugin development
Jquery plugin developmentJquery plugin development
Jquery plugin development
 
Intro to jquery
Intro to jqueryIntro to jquery
Intro to jquery
 
JQuery plugin development fundamentals
JQuery plugin development fundamentalsJQuery plugin development fundamentals
JQuery plugin development fundamentals
 
Jquery Plugin
Jquery PluginJquery Plugin
Jquery Plugin
 
Using JavaScript in Drupal
Using JavaScript in DrupalUsing JavaScript in Drupal
Using JavaScript in Drupal
 
JAVASCRIPT NÃO-OBSTRUTIVO com jQuery
JAVASCRIPT NÃO-OBSTRUTIVO com jQueryJAVASCRIPT NÃO-OBSTRUTIVO com jQuery
JAVASCRIPT NÃO-OBSTRUTIVO com jQuery
 
Prototype & jQuery
Prototype & jQueryPrototype & jQuery
Prototype & jQuery
 

Viewers also liked (7)

Jquery mobile2
Jquery mobile2Jquery mobile2
Jquery mobile2
 
J querypractice
J querypracticeJ querypractice
J querypractice
 
jQuery mobile UX
jQuery mobile UXjQuery mobile UX
jQuery mobile UX
 
J queryui
J queryuiJ queryui
J queryui
 
Jqeury ajax plugins
Jqeury ajax pluginsJqeury ajax plugins
Jqeury ajax plugins
 
Jquery2
Jquery2Jquery2
Jquery2
 
Web Storage & Web Workers
Web Storage & Web WorkersWeb Storage & Web Workers
Web Storage & Web Workers
 

Similar to Jqeury ajax plugins

Avinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPressAvinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPress
wpnepal
 
Javascript Frameworks for Joomla
Javascript Frameworks for JoomlaJavascript Frameworks for Joomla
Javascript Frameworks for Joomla
Luke Summerfield
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshow
sblackman
 
Yearning jQuery
Yearning jQueryYearning jQuery
Yearning jQuery
Remy Sharp
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
Chris Alfano
 
After max+phonegap
After max+phonegapAfter max+phonegap
After max+phonegap
yangdj
 

Similar to Jqeury ajax plugins (20)

Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
 
Clean Javascript
Clean JavascriptClean Javascript
Clean Javascript
 
jQuery
jQueryjQuery
jQuery
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortal
 
jQuery Internals + Cool Stuff
jQuery Internals + Cool StuffjQuery Internals + Cool Stuff
jQuery Internals + Cool Stuff
 
jQuery: Events, Animation, Ajax
jQuery: Events, Animation, AjaxjQuery: Events, Animation, Ajax
jQuery: Events, Animation, Ajax
 
Drupal & javascript
Drupal & javascriptDrupal & javascript
Drupal & javascript
 
Rails is not just Ruby
Rails is not just RubyRails is not just Ruby
Rails is not just Ruby
 
Avinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPressAvinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPress
 
jQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends ForeverjQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends Forever
 
Javascript Frameworks for Joomla
Javascript Frameworks for JoomlaJavascript Frameworks for Joomla
Javascript Frameworks for Joomla
 
Frontin like-a-backer
Frontin like-a-backerFrontin like-a-backer
Frontin like-a-backer
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshow
 
Introduction to backbone presentation
Introduction to backbone presentationIntroduction to backbone presentation
Introduction to backbone presentation
 
Yearning jQuery
Yearning jQueryYearning jQuery
Yearning jQuery
 
Hooks WCSD12
Hooks WCSD12Hooks WCSD12
Hooks WCSD12
 
AnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFacesAnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFaces
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
 
Understanding backbonejs
Understanding backbonejsUnderstanding backbonejs
Understanding backbonejs
 
After max+phonegap
After max+phonegapAfter max+phonegap
After max+phonegap
 

Jqeury ajax plugins

  • 2. ajax before jQuery function getXMLHttp() { var xmlHttp; if (window.XMLHttpRequest) { // Mozilla, Safari, ... var xmlHttp = new XMLHttpRequest(); } else if (window.ActiveXObject) { // IE var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } return xmlHttp; } function MakeRequest() { var xmlHttp = getXMLHttp(); xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) { HandleResponse(xmlHttp.responseText); } } xmlHttp.open("GET", "ajax.php", true); xmlHttp.send(); } function HandleResponse(response) { document.getElementById('ResponseDiv').innerHTML = response;} Inbal Geffen
  • 3. ajax using jQuery - $.post function MakeRequest() { var url = "ajax.php"; $.post(url, ' ' ,function(data) { $("#ResponseDiv").html(data).show(); }); } Inbal Geffen
  • 4. ajax using jQuery - $.get function MakeRequest() { var url = "ajax.php"; $.get(url, ' ' ,function(data) { $("#ResponseDiv").html(data).show(); }); } Inbal Geffen
  • 5. ajax using jQuery - $.ajax function MakeRequest() { $.ajax({ type: "GET", url: "ajax.php", success: function (result) { $("#ResponseDiv").html(result); }, error: function (error) { alert(error); } }); } Inbal Geffen
  • 6. jQuery plugins ● Many plugins exist in the web ● http://archive.plugins.jquery.com - main jQuery plugins archive ● Plugins usually include instructions and example code for how to use them ● http://www.simplefadeslideshow.com/ ● http://tympanus.net/codrops/2012/09/03/bookblock-a-content-flip-plugin/ ● http://plugins.in1.com/socialist/demo ● http://nbartlomiej.github.com/foggy/ ● http://tsvensen.github.com/equalize.js/ Inbal Geffen
  • 7. jQuery plugins <!--Add the jQuery.js and the plugin.js--> <head> <title>Example</title> <script src="jquery.js" type="text/javascript"></script> <script src="jquery.plugin.js" type="text/javascript"></script> </head> <!--Carousel example Add the jQuery.js and the plugin.js--> <script src="js/jquery-1.7.min.js" type="text/javascript" charset="utf-8"></script> <script src="js/jquery.featureCarousel.min.js" type="text/javascript" charset="utf-8" ></script> Inbal Geffen
  • 8. jQuery plugins <!--For each image we want to add to the carousel we need to add this kind of div--> <div class="carousel-feature"> <img class="carousel-image" src="images/flowers1.jpg" alt="Image1" /> <div class="carousel-caption"> <p>Amazing flower</p> </div> </div> Inbal Geffen
  • 9. jQuery plugins <!--All divs need to be nested under div with id="carousel" --> <body> <div id="carousel-container"> <div id="carousel"> <div class="carousel-feature"> <img class="carousel-image" src="images/flowers1.jpg" alt="Image1" /> <div class="carousel-caption"> <p>Amazing flower</p> </div> </div> <div class="carousel-feature"> ..... </div> </div> </body> Inbal Geffen