Here an example http://jsfiddle.net/6GdW6/
$(".thumbnail").live("click", function() {
$(".fullimage").hide();
var i = $("<img />").attr("src", this.href).load(function() {
$(".fullimage").attr("src", i.attr("src")).addClass("selected");
$(".fullimage").fadeIn();
});
return false;
});
- How to show first image by default if no click?
- How to add
selectedclass only on active link?
I want to keep current html format.
http://jsfiddle.net/6GdW6/2/