If you use jquery and you’ve ever created a web application that had any significant quantity of ajax requests initiated by links or forms, and the responses to those requests contained more links or forms that needed to be bound as ajax requests, then you’ve probably been repeating yourself ( or using the crippled jrails library if you’re using rails ).
This javascript framework provides a terse but completely flexible syntax for declaring an html element as ajax-bound, and manages the actual binding, both on initial page load and on any subsequent ajax response loads.
if you are using rails
<%= javascript_include_tag 'jquery_ajax_binder.js' %>
<%= link_to item.name, item_url(item),
:ajax_binding => “ajax_link”,
:ajax_method => ‘GET’,
:ajax_success_callback => “$(‘#some_id’).show();”,
:ajax_success_element => ‘dom_id_for_placing_the_result’
%>
or in plain html
<script type="text/javascript" src="/javascripts/jquery_ajax_binder.js"/>
<a href="http://example.com/restful/route/to/item/74"
ajax_binding="ajax_link"
ajax_method='GET'
ajax_success_callback="$('#some_id').show();"
ajax_success_element="dom_id_for_placing_the_result">