hoping someone can point me in the right direction.
We're trying to improve subscriptions to our mailing list. When a user visits our site after x amount of seconds, i'd like a panel to slide up asking them to sign up to the mailing list.
If they click any of the buttons (sign up, close, dont show again) I want to set a cookie so the panel doesn't show again.
I've mastered the slide up/down BUT i'm a newbie at the cookie side of things and not sure how to set it so when the cookie is set, the slide action doesn't occur again.
Here's my jQuery...
// MAILING LIST SLIDER //
// set a delay of 3 seconds before mailing list panel appears
$("#mailingListPanelSlide").delay(3000).slideDown("slow");
// set triggers to close the mailing list panel & set cookie
$("a#closeButton, p.negativeActionFormButton").click(function(){
$("div#mailingListPanelSlide").slideUp("slow");
$.cookie("mailingListPanel", "dontshow");
});
// HELP!!!! if cookie is set to collapsed, then don't perform slide down/hide panel altogether?
var mailingListPanel = $.cookie("mailingListPanel");
if (mailingListPanel == "dontshow") {
$("div#mailingListPanelSlide").css("display","none");
};
//END MAILING LIST SLIDER //