Skip to content

Instantly share code, notes, and snippets.

@53cr
Created September 4, 2008 15:38
Show Gist options
  • Save 53cr/8791 to your computer and use it in GitHub Desktop.
Save 53cr/8791 to your computer and use it in GitHub Desktop.
// showcase viewer
$(document).ready(function(){
$("div#showcase ul li a").act_as_showcase();
googlemap();
});
// showcase
(function($)
{
$.fn.act_as_showcase = function()
{
act_as_showcase = function(event)
{
event.preventDefault();
var img = new Image();
$('#viewer img').remove();
$('#viewer').addClass('loading');
$(img).load(function(){
$(img).hide();
$('#viewer').removeClass('loading').append(this);
$(img).fadeIn('slow');
}).attr('src',this);
};
this.click(act_as_showcase);
};
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment