Sleek Geek
12-17-2014, 02:50 AM
Trying to retain the action of the function below in all the pages.
Example: If the user closes the alert box, let it "alert box" stay closed on
all pages except if the user closes the browser and comes back. I tried local storage but that didn't work out well. How can this be
achieved?
My code is as below
$(document).ready(function() {
if($(".happening").length > 1 ) {
$(".happening-switch").click(function () {
$(".happening:visible").hide().next().show();
});
}});
$(document).ready(function() {
if($(".happening").length < 2 ) {
$(".happening-switch").click(function () {
$(".happening:visible").slideUp();
});
}});
Example: If the user closes the alert box, let it "alert box" stay closed on
all pages except if the user closes the browser and comes back. I tried local storage but that didn't work out well. How can this be
achieved?
My code is as below
$(document).ready(function() {
if($(".happening").length > 1 ) {
$(".happening-switch").click(function () {
$(".happening:visible").hide().next().show();
});
}});
$(document).ready(function() {
if($(".happening").length < 2 ) {
$(".happening-switch").click(function () {
$(".happening:visible").slideUp();
});
}});