http://wexcode.com/portfolio.php
For some reason, this page doesn't work in IE, but seems to work fine in all other browsers. Can anyone identify why this isn't working in IE? Thanks.
For some reason, this page doesn't work in IE, but seems to work fine in all other browsers. Can anyone identify why this isn't working in IE? Thanks.
Code:
$(function() {
$( "#small" ).accessNews();
$(".javascript_css").css("display", "none");
// http://blueonionsoftware.com/blog.aspx?p=4f47563f-69c4-4483-9a98-8c6a425fcf2c
$.fn.delay = function(time, callback)
{
return this.animate({ opacity: '+=0' }, time, callback);
}
/* Switch to large and back */
$.fn.swapImage = function(){
var name = $(this).attr("src");
name = name.substr(0, name.length - 10);
var image = "img[src='" + name + "_big.gif']";
var width = $(image).width();
var height = $(image).height();
$("#small").css("display", "none");
$(image).parent().parent().css("visibility", "visible");
$("#big").animate({height: height, width: width, padding: "12px 7px 12px 12px"}, 0);
$("#content").animate({width: width});
newWidth = width + 100 + "px";
$("#container").animate({width: newWidth}, 0);
return image;
};
$("#small li a img").click(function() {
var image = $(this).swapImage();
$(image).click(function() {
// Finish the animation first...
if(!$("#small").is(":animated")) {
$("#container").animate({width: "712px"}, 0);
$("#content").width("635px");
$("#big").animate({height: "1px", width: "1px", padding: "0px"}, 0);
$("#small").delay(0).fadeIn(0);
}
return false;
});
return false;
});
/* Switch to thumbnails and back */
$.fn.switchThumbs = function(){
$("#small").delay(0).toggle("slow");
$("#thumbnails").delay(0).toggle("slow");
};
$(".view-all a, .view-less a").click(function() {
// Make sure that a double click doesn't have any effect
if(!$("#small, #thumbnails").is(":animated"))
$(this).switchThumbs();
});
});
Comment