JQuery using cookies
- by ChrisMJ
Hi all, in my js file i want to be able to load a "splash screen" in a new air app im developing. At present when i call the splash screen it opens and closes fine, but its when i make it set a cookie it doesnt run at all. Please help...
cookieSplash();
function cookieSplash(){
var cookieSplash = $.cookie('loadSplash');
if (cookieSplash == "true") {
splash();
};
if (cookieSplash == "false") {
loadApplication();
};
}
function splash(){
$("#viewport").append('<div id="splash"><img id="splash-close" src="/images/splash-logo.png" alt="click to close"></div>');
$("#splash").click(function() {
// Act on the event
$("#splash").fadeOut("slow");
$("#jettison").fadeIn("fast");
$.cookie("loadSplash", "false");
});
}
function loadApplication(){
$("#jettison").fadeIn("fast");
}
Please help me out