Having stumbled upon this question, my solution is just jQuery and it involves setting up localStorage (make sure you have a polyfill). Hide the item you want to show only once.
$(function() { if ( localStorage.getItem('visited') ) { return; } var $el = $('.only-show-on-first-visit'); $el.slideDown(800); localStorage.setItem('visited', true); $el.find('.close').click(function() { $el.slideUp(); }); }); // polyfill if (!('localStorage' in window)) { window.localStorage = { _data : {}, setItem : function(id, val) { return this._data[id] = String(val); }, getItem : function(id) { return this._data.hasOwnProperty(id) ? this._data[id] : undefined; }, removeItem : function(id) { return delete this._data[id]; }, clear : function() { return this._data = {}; } }; }
muffs
source share