Limb.Class('ajaxLoader', { __construct: function(container) { if (container && jQuery(container)[0]) this.container = jQuery(container); else this.container = jQuery('body'); this.title = "Подождите ..."; this.build(); }, build: function() { var html = '' this.container.append(html); this.ajaxLoader = jQuery('.ajax_loader'); }, show: function (title) { var title = title || this.title; this.ajaxLoader.find('strong').html(title); this.ajaxLoader.show(); }, hide: function () { this.ajaxLoader.hide(); } }) /*============================== WINDOW READY ==============================*/ jQuery(window).ready(function(){ //-- adminAjaxLoader ajaxLoader = new ajaxLoader('#wrapper'); });