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
 
Jqeury ajax plugins
Jqeury ajax pluginsJqeury ajax plugins
Jqeury ajax plugins
Inbal Geffen
 

What's hot (20)

Pemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionPemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan Session
 
How kris-writes-symfony-apps-london
How kris-writes-symfony-apps-londonHow kris-writes-symfony-apps-london
How kris-writes-symfony-apps-london
 
CakeFest 2013 keynote
CakeFest 2013 keynoteCakeFest 2013 keynote
CakeFest 2013 keynote
 
Introducing CakeEntity
Introducing CakeEntityIntroducing CakeEntity
Introducing CakeEntity
 
jQuery in 15 minutes
jQuery in 15 minutesjQuery in 15 minutes
jQuery in 15 minutes
 
Introducing CakeEntity
Introducing CakeEntityIntroducing CakeEntity
Introducing CakeEntity
 
DOM Scripting Toolkit - jQuery
DOM Scripting Toolkit - jQueryDOM Scripting Toolkit - jQuery
DOM Scripting Toolkit - jQuery
 
Sprout core and performance
Sprout core and performanceSprout core and performance
Sprout core and performance
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutesLearning jQuery in 30 minutes
Learning jQuery in 30 minutes
 
New in cakephp3
New in cakephp3New in cakephp3
New in cakephp3
 
Bacbkone js
Bacbkone jsBacbkone js
Bacbkone js
 
Advanced Querying with CakePHP 3
Advanced Querying with CakePHP 3Advanced Querying with CakePHP 3
Advanced Querying with CakePHP 3
 
Basics of j query
Basics of j queryBasics of j query
Basics of j query
 
Beyond the DOM: Sane Structure for JS Apps
Beyond the DOM: Sane Structure for JS AppsBeyond the DOM: Sane Structure for JS Apps
Beyond the DOM: Sane Structure for JS Apps
 
J query training
J query trainingJ query training
J query training
 
Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operation
 
Matters of State
Matters of StateMatters of State
Matters of State
 
Jqeury ajax plugins
Jqeury ajax pluginsJqeury ajax plugins
Jqeury ajax plugins
 
Mocking Demystified
Mocking DemystifiedMocking Demystified
Mocking Demystified
 
Jquery
JqueryJquery
Jquery
 

Viewers also liked (6)

Jquery mobile2
Jquery mobile2Jquery mobile2
Jquery mobile2
 
jQuery mobile UX
jQuery mobile UXjQuery mobile UX
jQuery mobile UX
 
Jquery2
Jquery2Jquery2
Jquery2
 
J querypractice
J querypracticeJ querypractice
J querypractice
 
J queryui
J queryuiJ queryui
J queryui
 
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 NÃO-OBSTRUTIVO com jQuery
JAVASCRIPT NÃO-OBSTRUTIVO com jQueryJAVASCRIPT NÃO-OBSTRUTIVO com jQuery
JAVASCRIPT NÃO-OBSTRUTIVO com jQuery
Zigotto Tecnologia
 
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
 

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
 
JQuery In Drupal
JQuery In DrupalJQuery In Drupal
JQuery In Drupal
 
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
 
Introducing jQuery
Introducing jQueryIntroducing jQuery
Introducing jQuery
 
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
 
JAVASCRIPT NÃO-OBSTRUTIVO com jQuery
JAVASCRIPT NÃO-OBSTRUTIVO com jQueryJAVASCRIPT NÃO-OBSTRUTIVO com jQuery
JAVASCRIPT NÃO-OBSTRUTIVO com jQuery
 
Aplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com BackboneAplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com Backbone
 
jQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends ForeverjQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends Forever
 
JQuery
JQueryJQuery
JQuery
 
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
 

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