overlay fade in / transition

mstevenson / 2013-02-26 01:06:05   

I was wondering if the overlay.css could be changed so that the transition between images is not a fade in, but simply the loaded image? In other words, you mouse-click to go to the next image, the loading graphic comes up, and then the image loads. When the image loads it fades in, and I would like it not to. Is it possible to change this? If so, how and where?

Thanks

Vaska A / 2013-02-26 01:22:28   

It's possible. It's not a CSS thing though, it's javascript. There are a few ways to do this but the easiest might be simply to change the speed of the transition - for instance change the fadeIn functions to a speed of 0:

  1. $('#o' + current_node).fadeIn(0); // instead of 1000

This is untested - there could be other side effects. Be sure you shift + browser refresh after changes.

The file is /ndxzsite/js/jquery.ndxzbox.js.

It's a good idea to add the ability to adjust the speed more easily - something we'll add to our list of things to do.

mstevenson / 2013-02-26 01:56:44   

Tried that. Now the image loads with a gray background, there are no "x" for closing or arrows next or back and nothing happens when you click on the image. I actually figured I would try 500 instead of 0:

$('#o' + current_node).fadeIn(500);

I changed it back to 1000 but it still doesnt work. Here is what it looks like:

mstevensonphotography.com/project/the-loneliest-planet/

Any suggestions on how to just get it back to the way it was?

Vaska A / 2013-02-26 01:58:31   

You broke the javascript with your edits. Simply reupload that file from the ones you got from our site. You could then try editing it again...have to be careful though.

mstevenson / 2013-02-26 02:17:54   

Okay, reuploaded and its fixed now. Is there a chance that this will work if I keep trying the same thing? Im new (and will likely remain so) to website editing and I cant even begin to understand 1) how when I changed the code back, it didnt fix it, but reuploading the file did and 2) how to be careful. Is there a chance this will work one of the times I try it? Would other numbers be more or less likely to work?
As I was scrolling through the code there were several other areas i noticed a fadein of 1000, could it be that more than this one needed to be changed?

I suppose what I would want to know most of all, will reuploading the file always work to fix it, or could this cause problems elsewhere if I keep trying?

If this is way too complicated to explain dont worry about it. The transition isnt really a big deal, just something i noticed seemed a bit long.

Thanks for you help

mstevenson / 2013-02-26 04:05:27   

I tried 0 this time, i.e;

$('#o' + current_node).fadeIn(0);

and it does work. This takes the fade transitions out. Sorry if i wasnt clear before. I wasnt sure I wanted the fade to be completely off or just reduced and was looking to try out different speeds. I thought maybe the script you posted was more of a direction of where to start. Im assuming this time scale is in msec's and that to do something other than take the transition completely out requires making changes elsewhere in the script. Youre right though, it would be a nice addition to be able to change the speed of this transition. For now, turning off will be fine.

Thanks

This thread has been closed, thank you.