jquery-ahm: A Better Way To AJAX Requests – Light-Weight jQuery Plugin

jQuery-ahm is a tiny (~1kb) jQuery plugin which enables us to create Ajax requests with a smaller code piece.

It is actually a wrapper around the popular $.ajax method and brings a different way of handling callbacks.

Rather than creating custom callbacks for every Ajax request, jQuery-ahm lets the back-end define Ajax callbacks (handled automatically).
jQuery Plugin To AJAX Requests


jquery-ahm is a replacement for $.ajax. With $.ajax, every ajax request needs a callback, resulting in a lot of javascript. $.ahm reduces javascript code by letting the response data define the actual callbacks.

  • Super light-weight: ~1KB minified
  • Reduces ajax requests to one-line (including ajax form validation)
  • No more custom callbacks for every ajax request
  • Lets back-end define post ajax callbacks (applied automagically)
  • Supports all jquery + custom callbacks in back-end code
  • Drop in replacement for $.ajax() (supports all $.ajax options)

Here is an example where all the callback is handled on the server-side:

02.$response = array(
03.// $("#animate").fadeOut("slow").delay("1000").slideDown("fast")
04."#animate/fadeOut" => "slow",
05."#animate/delay" => "1000",
06."#animate/slideDown" => "fast",
08.echo json_encode($response);

The bad part is, you move the front-end code and functionality to the server-side. This is not a preferred method for many designers/developers and it is mostly difficult if the front and back-end developers are different persons.
And the nice part is, size of the front-end code can be decreased seriously, specially for websites with lots of Ajax interactions and you get lots of flexibility in managing the callbacks.

Requirements: jQuery
Website: http://www.jqueryahm.com/
Demo: http://www.jqueryahm.com/examples
Download: http://www.jqueryahm.com/download


We hope, We will become the best, creative and inspiring community for web and graphics. Join Us! Can be part of the growing Team. Just write something Creative and Interesting. Click here to become a member.


Trackbacks to this post.
Leave a Reply

Copyright © 2021 Freebies, Free Fonts, WordPress Themes, Logos & Tutorials. All Rights Reserved.
Powered by Wordpress.
About Us | Advertise | Write For Us | Contact Us