// LiteLay v0.2 - jQuery content loading overlay plugin (function ($) { $.fn.litelay = function (options) { options = options || {}; this.each(function () { var $this = $(this), data = $this.data('litelay'), litelay = $('
').addClass('litelay'), content = $('
').addClass('content').appendTo(litelay); if (options.off === true && !data) { return; } // Check if litelay has already been initialized on this element. If so, remove it. if (data) { $this.find('> .litelay').remove(); $this.removeData('litelay'); return; } if (options.message) { content.append('
' + options.message + '
'); } if (options.spinner) { content.append('
'); } $this.append(litelay); $this.data('litelay', { init: true, }); }); return this; }; }(jQuery));