Sha256: 213edcf80fa7fd0ed99f4d65226345c208a917a662366a79ef2b752384e0bf51
Contents?: true
Size: 559 Bytes
Versions: 6
Compression:
Stored size: 559 Bytes
Contents
// refactoring from https://github.com/leonid-shevtsov/cacheable-flash-jquery var Flash = new Object(); Flash.data = {}; Flash.transferFromCookies = function() { var data = JSON.parse(unescape($.cookie("flash"))); if(!data) data = {}; Flash.data = data; $.cookie('flash',null, {path: '/'}); }; Flash.writeDataTo = function(name, element) { element = $(element); var content = ""; if (Flash.data[name]) { message = Flash.data[name].toString().replace(/\+/g, ' '); element.html(message); element.show(); } };
Version data entries
6 entries across 6 versions & 1 rubygems