Team 247 Gallery Help

First, i’d like to get some feedback on this part of the site in general:
www.247dabears.com/gallery

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

first off, i love the way it is linked when you click on it and how there is a picture with the text. SO creative :slight_smile:

The way the gallery functions is very cool with the captions to the side.

As far as the code goes…I couldn’t figure out how to get to it to see it…

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');
	 });*/
	 

the “battery falling out” picture is epic

don’t gallery links like this usually auto-cookie?

and the code is so clearly organized; so easy to actually understand :slight_smile:

my guess is its an error that may be with the layout of the site…?

Try this link to figure out how to accept cookies:
http://www.shopdev.co.uk/blog/cookies-with-jquery-designing-collapsible-layouts/
^^ it uses jquery like your layout…so i hope it helps you :slight_smile:

Auto cookie? and thanks for the link, i’ll check it out.

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?

It makes the cookie fine, it reading doesn’t work. the if cookie ='s blah then do blah isn’t working.

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)

Most web languages are VERY particular about these things and so that can be the problem. good job noticing the problem :slight_smile:

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 say stick to either JAVA or CSS because it can take more time for the server to register, thus longer loading time.

As far as fixing it goes, try with just CSS and just JAVA and see which is sleeker =)

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 :stuck_out_tongue:

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