jQuery problem in IE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • metaphysics
    New Member
    • May 2007
    • 59

    jQuery problem in IE

    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.

    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();
    	});
    	
    });
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    what exactly is not working and is it with a specific IE version or IE in general?

    kind regards

    Comment

    • metaphysics
      New Member
      • May 2007
      • 59

      #3
      Nevermind, I figured it out. Seems that jQuery doesn't like:

      $("#big").anima te({height: height, width: width, padding: "12px 7px 12px 12px"}, 0);

      Apparently, it works better with:
      style: 'padding: 12px 7px 12px 12px'

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        glad to hear that you got it working ... :) ... and thanks for posting the solution ...

        kind regards

        Comment

        Working...