Also, if you look at the commented code, i have it so that you will get a cookie when you click any of the gallery links, and i want it so i can get them to stay open when you come back if the cookie = 09 or 08. Anyone?
Thanks
Thanks!
It uses jquery with cookie addon.
clicked is the name of the cookie, and some of the comments are wrong.
.under is the sub banners of the page.
Code:
/*if($.cookie('clicked') == "09"){
$("#Traverse").show("slow"); //show traverse banner
$("#TFF").show("slow"); //show TFF banner
$("#award").show("slow"); //show TFF banner
}
if($.cookie('clicked') == "08"){
$("#bowl").show("slow"); //show bowling banner
$("#oldTFF").show("slow"); //show TFF banner
$("#canada").show("slow"); //show canada banner
$("#detriot").show("slow"); //show detriot banner
$("#end08").show("slow"); //show end of the year banner
$("#open08").show("slow"); //show open House banner
}
if($.cookie('clicked') != "08" || $.cookie('clicked') != "09"){*/
$("#Traverse").hide(); //hide the traverse banner
$("#TFF").hide(); //hide the team ford first banner
$(".under").hide(); //hide all banner
//}
/*$("#Traverse").click(function(event){
$.cookie('clicked', '09');
});
$("#TFF").click(function(event){
$.cookie('clicked', '09');
});
$("#award").click(function(event){
$.cookie('clicked', '09');
});
$("#bowl").click(function(event){
$.cookie('clicked', '08');
});
$("#oldTFF").click(function(event){
$.cookie('clicked', '08');
});
$("#canada").click(function(event){
$.cookie('clicked', '08');
});
$("#detriot").click(function(event){
$.cookie('clicked', '08');
});
$("#end08").click(function(event){
$.cookie('clicked', '08');
});
$("#open08").click(function(event){
$.cookie('clicked', '08');
});*/
yeah like don’t browsers auto accept cookies (unless you state not to in “options” tab)? in your case i think its different because you want it to use it to create a certain design feature (from what i understand) and maybe its a certain problem accepting cookies within the individual browser settings?
did you define what the value of “08” and “09” are on some other part because that can be the problem; it may not understand the definition of the code
would it matter if they were in quotes? I can’t edit it at the moment, but it ocured to me that maybe i wrote string ("") when i meant value (without quotes)
Well the problem was the 0 in front of the nine/eight, firefox was erroring out saying " Warning: 09 is not a legal ECMA-262 octal constant"
My next question is how to preload the images. i have so they are hidden by CSS, and once the page loads the are hidden by JavaScript not CSS, but it still looks funny. Any ideas on a way to preload it?
I hope you mean javascript? because i don’t know any java (tried to learn it, looked at some simple scripts and thought That ain’t simple and put it down)
And how exactly should i do it though? i’ve seen others preloading scripts but how (i don’t really need code just an idea here) should i do it ?
oops yeah i did. sorry…so used to refering to it as JAVA like the AP class
I recommended coding what you have now into CSS as one idea and then one into javascript as another and see what you like more.
As far as a preloader goes, i recommended using whichever you are more comfortable with. (for me, that’s CSS) and research the code to see how other sites do it and formulate how you want it to function