473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.

Expand|Select|Wrap|Line Numbers
  1. $(function() {
  2.     $( "#small" ).accessNews();    
  3.     $(".javascript_css").css("display", "none");
  4.  
  5.     // http://blueonionsoftware.com/blog.aspx?p=4f47563f-69c4-4483-9a98-8c6a425fcf2c
  6.     $.fn.delay = function(time, callback)
  7.     {
  8.         return this.animate({ opacity: '+=0' }, time, callback);
  9.     }    
  10.  
  11.     /* Switch to large and back */
  12.     $.fn.swapImage = function(){
  13.         var name = $(this).attr("src");
  14.         name = name.substr(0, name.length - 10);
  15.         var image = "img[src='" + name + "_big.gif']";
  16.         var width = $(image).width();
  17.         var height = $(image).height();
  18.         $("#small").css("display", "none");
  19.         $(image).parent().parent().css("visibility", "visible");
  20.         $("#big").animate({height: height, width: width, padding: "12px 7px 12px 12px"}, 0);
  21.         $("#content").animate({width: width});
  22.         newWidth = width + 100 + "px";
  23.         $("#container").animate({width: newWidth}, 0);
  24.         return image;
  25.     };
  26.  
  27.     $("#small li a img").click(function() {
  28.         var image = $(this).swapImage();
  29.         $(image).click(function() {
  30.             // Finish the animation first...
  31.             if(!$("#small").is(":animated")) {
  32.                 $("#container").animate({width: "712px"}, 0);
  33.                 $("#content").width("635px");
  34.                 $("#big").animate({height: "1px", width: "1px", padding: "0px"}, 0);
  35.                 $("#small").delay(0).fadeIn(0);
  36.             }
  37.             return false;
  38.         });
  39.         return false;
  40.     });
  41.  
  42.     /* Switch to thumbnails and back */
  43.     $.fn.switchThumbs = function(){
  44.         $("#small").delay(0).toggle("slow");
  45.         $("#thumbnails").delay(0).toggle("slow");
  46.     };
  47.     $(".view-all a, .view-less a").click(function() {
  48.         // Make sure that a double click doesn't have any effect
  49.         if(!$("#small, #thumbnails").is(":animated"))
  50.             $(this).switchThumbs();
  51.     });
  52.  
  53. });
Jan 3 '10 #1
3 2954
gits
5,390 Expert Mod 4TB
what exactly is not working and is it with a specific IE version or IE in general?

kind regards
Jan 4 '10 #2
Nevermind, I figured it out. Seems that jQuery doesn't like:

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

Apparently, it works better with:
style: 'padding: 12px 7px 12px 12px'
Jan 5 '10 #3
gits
5,390 Expert Mod 4TB
glad to hear that you got it working ... :) ... and thanks for posting the solution ...

kind regards
Jan 5 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Gale | last post by:
I'm working on something in jQuery with XPath What I want to do is: if checkbox is checked, set background color od label that contain input(checkbox) to red I have this code:...
5
by: ziobudda | last post by:
Hi, I want ask you if, for a web portal/application, is better prototype or Jquery? I don't want to innesc some type of flame, but after the announce that drupal use JQuery and that the new...
1
by: DuaneMoraes | last post by:
A new book on jQuery, the powerful JavaScript library, has been announced by Packt In Learning jQuery, Karl Swedberg and Jonathan Chaffer, creators of the popular jQuery learning resource...
1
by: mikeh3275 | last post by:
I'm new to developing in jQuery, so I'm probably doing this wrong. I'm loading a form into a modal dialog box and I'm trying to assign a click event to the button in the form, but I can't seem to...
83
by: liketofindoutwhy | last post by:
I am learning more and more Prototype and Script.aculo.us and got the Bungee book... and wonder if I should get some books on jQuery (jQuery in Action, and Learning jQuery) and start learning about...
20
by: Aaron Gray | last post by:
There does not seem too be anyway to test if two jQuery references are the same element. Given :- ... <div id="1"></div .... Then :- alert( $("#1") == $("#1"))
26
by: RobG | last post by:
Do some of the regulars here need to re-think their (sometimes strident) opposition to libraries? Both Microsoft and Nokia have announced support for jQuery. It seems to have gained quite a bit...
2
by: souporpower | last post by:
Hi All I am trying to print some HTML using JQUERY. I am posting the code. I don't see the alert. It seems as though the function is not registered when the document is loaded. Can someone...
53
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.