473,659 Members | 3,553 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

jQuery problem in IE

59 New Member
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 2965
gits
5,390 Recognized Expert Moderator Expert
what exactly is not working and is it with a specific IE version or IE in general?

kind regards
Jan 4 '10 #2
metaphysics
59 New Member
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'
Jan 5 '10 #3
gits
5,390 Recognized Expert Moderator Expert
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
11471
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: $("label]").css("background", "red"); but it doesn't working because of nested brackets ] and it freeze the browser
5
3583
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 Wordpress 2.2 use Jquery I ask myself if my choice of use prototype.js is the bettere choice. M. Sorry for my bad english.
1
1899
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 www.LearningjQuery.com, share their knowledge, experience, and enthusiasm about jQuery to help users get the most from the library and to make their web applications shine. jQuery is a powerful JavaScript library that can enhance websites regardless of the...
1
49872
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 get anything to happen. Below is the code. Thanks in advance. jQuery: jQuery(document).ready(function() { jQuery("a").click(function() { jQuery("#dialog").dialog({ modal: true,
83
4165
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 it too? Once I saw a website comparing Prototype to Java and jQuery to Ruby... but now that I read more and more about Prototype, it is said that Prototype actually came from Ruby on Rails development and the creator of Prototype created it...
20
2274
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
3135
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 of momentum, can it be considered a reasonable choice for those who want to use a full-featured, well supported library? <URL: http://jquery.com/blog/2008/09/28/jquery-microsoft-nokia/ >
2
4553
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 please clarify what I am doing wrong? BTW, I am using IE8 and Chrome to test. Sorry I can't place the code in a web site. Thanks for your help
53
8370
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 language="javascript" type="text/javascript">
5
4933
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 there are, it crashes. There are currently 6 columns, and I only want 4. How do I remove the last two (discount and date)? Here is a link: http://www.jaredmoore.com/tablesorter/docs/salestable.html Here is some jquery js that I think...
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8337
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8531
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8628
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7359
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2754
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1978
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.