Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 953 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 953 Bytes

jquery.busybox

“BUSYBOX”, a sipler and cooler Ajax-loader. jQuery plugin

busyBox is intended to display the HTML box(es) to be updated by an AJAX request as 'busy' while performing such request.

This plugin differs from others in the way it just put a transparent 'layer' over the involved boxes (this using a jQuery selector) instead of putting it over the entire body, in this way the user will specifically know which sections of the page are being updated.

Example of usage:

var loading = $("#my_container").busyBox({
  spinner: '<img src="themes/gold/images/loading.gif" />'
});

$.ajax({
  url: "/my-url",
  success: function(data, textStatus, XMLHttpRequest){
     $("#my_container").html(data).fadeIn('fast');
  },
  complete: function complete(XMLHttpRequest, textStatus){
    loading.busyBox('close');
  }
});

In images directory, you can find some 'spinners' to reuse.