Showing posts with label Ajax. Show all posts
Showing posts with label Ajax. Show all posts

Monday 27 May 2013

Ajax Methods in JQuery

Ajax Methods in JQuery

jQuery Load Method
load(): Load a piece of html into a container DOM.

jQuery GET Method
$.get(): Use this if you want to make a GET call and play extensively with the response.
$.get('ajax/test.html', function(data) {
  alert('Load was performed.');

jQuery POST Method
$.post(): Use this if you want to make a POST call and don’t want to load the response to some container DOM.
$.post('ajax/test.html', function(data) {

jQuery AJAX Method
$.ajax(): Use this if you need to do something when XHR fails, or you need to specify ajax options (e.g. cache: true) on the fly.
  type: "POST",
  url: "some.php",
  data: { name: "John", location: "Boston" }
}).done(function( msg ) {
  alert( "Data Saved: " + msg );

jQuery getJSON Method
Return the Response in JSON Format
$.getJSON("/ajax/json_response", function(result){

Sunday 15 July 2012

jQuery Fancybox

jQuery Fancybox

Is your need?
  • Image in Popup
  • Image Gallery in Popup
  • Inline data in popup 
  • Ajax data in Popup
  • Call callback function with popup
  • Google Map in Popup 

If above of anyone is your requirement, then this post is only for you.

Then solution is, it provide all the above features with jQuery.

Q What is Fancybox?
A fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages. It is built at the top of the popular JavaScript framework jQuery and is both easy to implement and a snap to customize.

Q. What Features it provide?
A. Following features it provide.
  • Can display images, HTML elements, SWF movies, Iframes and also Ajax requests
  • Customizable through settings and CSS
  • Groups related items and adds navigation.
  • If the mouse wheel plugin is included in the page then FancyBox will respond to mouse wheel events as well
  • Support fancy transitions by using easing plugin
  • Adds a nice drop shadow under the zoomed item