October 30, 200917 yr Hi guys, i'm trying to setup my website: http://www.unleashednights.co.uk so that the lytebox loads on start, stores a cookie and then when they revisit it wont launch. I need the lytebox to show my email mailing list join form, i'm trying to push people to join up! Any help would be awesome! Regards, Stefan http://www.prettyklicks.com
October 30, 200917 yr http://jqueryui.com/demos/dialog If that link doesn't work do a search for UI dialog. It's far more appropriate for what you need i thin. That or the jQuery tools overlay module.
October 31, 200917 yr Author Right got there, now im trying to implement a cookie to stop it coming up when its already been closed the first time round: It's not working though, keeps coming up anyway! Whats wrong with this? <script type="text/javascript"> $(function() { $("#dialog").dialog({ bgiframe: true, modal: true, resizable: false, autoOpen: true, width:200, buttons: { Ok: function() { $(this).dialog('close'); $.cookie('doneWin', 'closed' { expires: 2 }); } } }); }); </script> <script type="text/javascript"> var doneWin = $.cookie('doneWin'); if (doneWin == 'closed') { $("#dialog").dialog('close'); }; }); </script> Regards, Stefan
October 31, 200917 yr I've not worked much with JS cookies. Might be wrong in saying this but i don't think you can just set a cookie like that with JS, you need expiry times etc and time stamps. I've got something we worked through back in college that should do just the trick. It's on the other computer if this isn't resolved by tomorrow will hook you up.
October 31, 200917 yr Author Yeh i've downloaded the jquery script an attached it in the head though. It allows it to be created as displayed in the jquery. Pretty nifty: heres the link : http://www.shopdev.co.uk/blog/cookies-with-jquery-designing-collapsible-layouts/
November 1, 200917 yr Author Anyone see whats wrong with my code? sorry im just running to a deadline
Create an account or sign in to comment