IE7 and earlier won't run jQuery

  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

I've been having this problem for a while. I don't have any ridiculous jQuery, your basic animations and css sets...and yet IE7 and earlier won't run them. It works in IE8, chrome, safari, opera...just about everything BUT IE7 and earlier. Is there some sort of crazy crap going on in IE7 that I don't know about? I'm using the newest release of jquery, 1.3.2. What's the dealio?

You can see the site here: http://com-tech.aims.edu/~mgd141/student2/experiments/voltec/
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

I'm not seeing it work anywhere. For starters, looks like one of your includes is missing:

Quote:
The requested URL /~mgd141/student2/experiments/voltec/js/function.js was not found on this server.

Index of /~mgd141/student2/experiments/voltec/js
[ICO] Name Last modified Size Description
[DIR] Parent Directory -
[ ] Default_error_400.font.js 28-Dec-2009 19:25 73K
[ ] arialbd_700.font.js 28-Dec-2009 19:24 1.2K
[ ] bold_400.font.js 28-Dec-2009 19:25 15K
[ ] cufon.js 28-Dec-2009 19:25 35K
[ ] custom-form-elements.js 28-Dec-2009 19:25 22
[ ] fonts.js 28-Dec-2009 19:25 110K
[DIR] ie7/ 22-Dec-2009 17:06 -
[ ] jquery.blindToggle.js 28-Dec-2009 19:25 542
[ ] jquery.easing.1.1.js 28-Dec-2009 19:25 8.1K
[ ] jquery.easing.min.js 28-Dec-2009 19:25 2.5K
[ ] jquery.js 28-Dec-2009 19:25 131K


No function.js there. Beyond that, I don't see any actual javascript calls from within the page anywhere, so it makes sense right now that it's not doing anything.
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

okay, I guess that server is screwed up for a while, my college is doing maintanance on it. Check here instead:

http://www.xaetrex.net/vws/voltec/
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

I just checked on browsershots to see what browsers won't run this javascript.

Successful
  • FF 3.5
  • FF 3.1
  • FF 3.0
  • FF 2.0
  • FF 0.9
  • Safari 4.0
  • Safari 2.0
  • Opera 10.0
  • Opera 9.8 thru Opera 9.25 (all versions of opera 9)
  • Opera 8.54
  • MSIE 8

Unsuccessful
  • MSIE 7
  • MSIE 6

How is it that every modern browser, and even browsers like FF 0.9 that was released clear back in June of 2004, render these websites accurately, and yet IE 7 cannot? WTF!?!?!?
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

Finally able to reproduce with IE8 compatibility and have a few minutes, so I'll see what I can find.
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

My hunch is that FF works with implied positioning whereas IE needs your positioning defined.

Quote:
Expected identifier, string or number
function.js
Line:78
Code:0
Char:11


That error (from IE) points to the first place animate is called in your code. Basically, for any elements on the page that you want to animate, you need to add CSS position, top, and left to ie.css so that a starting position is properly defined.
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

I went ahead and added "top" to my properties for the "#pointer" selector, which is the first selector that uses the "animate" effect. Now the css looks like this for that selector:

CSS Code: [ Select ]
#pointer {
Here-->  position: relative;
      width: 50px;
      height: 25px;
      margin: -37px auto 0px auto;
      padding: 0px;
      background: url(../images/nav_animate_arrow.png);
Here-->  left: -330px;
Here-->  top: 0px;
}
 
  1. #pointer {
  2. Here-->  position: relative;
  3.       width: 50px;
  4.       height: 25px;
  5.       margin: -37px auto 0px auto;
  6.       padding: 0px;
  7.       background: url(../images/nav_animate_arrow.png);
  8. Here-->  left: -330px;
  9. Here-->  top: 0px;
  10. }
  11.  


Still a no go :(
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

I found a SO post to back me up, but that's the only thing I see. Doesn't mean there's not something else there, though. My only remaining suggestion is to try it on all of them just in case the first break in javascript is causing the rest to fail. don't know.
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

I just added "top" and "left" to everything that has a "position" property defined... this sucks. At this point it probably would have taken me less time to build a time machine and destroy IE before it was created then to fix this website
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

SUCCESS!!!!!!

This is a snippet of my jquery:

JAVASCRIPT Code: [ Select ]
$('#designbutton').click(function() {
   $('#bodycontentmainlist').stop().animate({
         left : "-2100px", // <-- look here
      }, 800, 'backinout');
});
 
  1. $('#designbutton').click(function() {
  2.    $('#bodycontentmainlist').stop().animate({
  3.          left : "-2100px", // <-- look here
  4.       }, 800, 'backinout');
  5. });
  6.  


Notice that there is a comma after "left : '-2100px' "

I removed this comma and suddenly it works...crazy IE7.

JAVASCRIPT Code: [ Select ]
$('#designbutton').click(function() {
   $('#bodycontentmainlist').stop().animate({
         left : "-2100px" // <-- look here, no comma
      }, 800, 'backinout');
 
  1. $('#designbutton').click(function() {
  2.    $('#bodycontentmainlist').stop().animate({
  3.          left : "-2100px" // <-- look here, no comma
  4.       }, 800, 'backinout');
  5.  
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

Well dang, I totally missed that one, too. Should have stuck to my own preachings and read the code backwards. Ah well, at least you can keep any hair you haven't pulled out by now. :)

Post Information

  • Total Posts in this topic: 11 posts
  • Users browsing this forum: No registered users and 70 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.