i’m building a jQuery Plugin to turn a div full of <img /> into a gallery. I ran into a problem, i can’t seem to solve:
right now, i call the plugin on document ready so, for a few 10ths of a second, i can see all the images at the same time, before i hide() all but the first one.
the plugin works this way:
$(function(){$('div').gallery();});
and in the plugin:
$(this).find('img').wrap('<div />').hide();
$(this).find('img:first').show();
does anyone have any suggestions?
Thanks
He/she may delay calling it for seconds or minutes after the page has loaded along with all the images. So it is up to him/her to hide the images e.g. via CSS:
{display: none}.