Sha256: 925cc1accf47cc7c5daf047b43dafcd66c7657129f836d0d2cd0bcb8824315d3
Contents?: true
Size: 920 Bytes
Versions: 8
Compression:
Stored size: 920 Bytes
Contents
if (typeof(Alchemy) === 'undefined') { var Alchemy = {}; } (function($) { $.extend(Alchemy, { ButtonObserver: function (selector) { $(selector).not('.no-spinner').click(function(event) { Alchemy.disableButton(this); }); }, disableButton: function (button) { var $button = $(button), $clone = $button.clone(), width = $button.outerWidth(), text = $button.text(); $button.hide().addClass('disabled'); $button.parent().append($clone); $clone.attr({disabled: true, href: 'javascript:void(0)'}) .addClass('cloned-button') .css({width: width}) .html('<img src="/assets/alchemy/ajax_loader.gif" style="width: 16px; height: 16px">') .show(); return true; }, enableButton: function (button) { var $button = $(button).not('.no-spinner'); $button.show().removeClass('disabled'); $button.parent().find('.cloned-button').remove(); return true; } }); })(jQuery);
Version data entries
8 entries across 8 versions & 1 rubygems