my jQuery codes suspected to fail on IE 7

Posted by Kyle on Stack Overflow See other posts from Stack Overflow or by Kyle
Published on 2010-04-13T21:11:41Z Indexed on 2010/04/13 21:13 UTC
Read the original article Hit count: 613

Filed under:
|

I have received numerous calls from users lately, stating that they are not able to access the conference sites with IE7. These sites are created from a template, and they are managed on Joomla.

Previously on other sites, there have no problems or complaints. However, with the recent complaints , I suspect that the culprit is my simple jQuery codes since the sites that have been reported have been created recently and incorporated with jQuery features.

Site A (does not contain any jQuery): digitalmediaroi.net

Site B (With recent complaints that fails to load on certain IE7): http://brownfieldscanada.com/

These are the jQuery codes that are running concurrently on a page. Are they using too much memory, therefore causing a problem on IE 7 ?

<span id="alertTxt" style="text-align:center;display:none"><span style="color:#CC0000; font-weight:bold;">ALERT:</span> Municipalities, Developers, Owners, QPs, Consultants, Lawyers, Service Providers</span>
<span id="alertTxt2" style="text-align:center; font-weight:bold; display:none">This high-level summit is specifically designed for YOU!</span>
<span id="alertTxt3" style="text-align:center; font-weight:bold; display:none;  color:#184b26;">Don't miss our Ground Water Protection, Shallow Soil and Waterfront Properties Workshop</span>
<span id="alertTxt4" style="text-align:center; font-weight:bold; display:none"><a href="register/registeronline.html" title="Register for the Transforming &amp; Revitalizing Downtowns Summit!" style="font-family:ariel, helvetica, san-serif; color:#000099; text-decoration:underline;">Online registration now available!</a></span>

<script type="text/javascript">
function animateTxt() {
 $j("#alertTxt").fadeIn(2000).delay(6000).fadeOut(1500, function() {
 $j("#alertTxt2").fadeIn(2000).delay(3000).fadeOut(1500,function(){   
    $j("#alertTxt3").fadeIn(2000).delay(6000).fadeOut(1500,function(){   
     $j("#alertTxt4").delay(500).fadeIn(2000).delay(4000).fadeOut(1500,function(){
    animateTxt();});
  });
 });  
 });
}
animateTxt();

</script>


<script type="text/javascript">// <![CDATA[
var imgs1 = new Array("http://www.brownfieldscanada.com/images/brown-images/sponsors/intrinsik.jpg", "http://www.brownfieldscanada.com/images/brown-images/sponsors/stantec.jpg");
var imgs1_alt = new Array("Intrinsik - Sponsor of Ontario Brownfields Regulatory Summit", "Stantec - Sponsor of Ontario Brownfields Regulatory Summit");
var sponsor_names = new Array("Sponsor:","Sponsor:");
var lnks1 = new Array("http://www.intrinsikscience.com/", "http://www.stantec.com/");
var currentAd1 = 0;
var imgCt1 = imgs1.length;

function cycle1() {
  if (currentAd1 == imgCt1) {
    currentAd1 = 0;
  }
var banner1 = document.getElementById('adBanner1');
var link1 = document.getElementById('adLink1');
  banner1.src=imgs1[currentAd1];
  banner1.alt=imgs1_alt[currentAd1];
  link1.href=lnks1[currentAd1];
  document.getElementById('sponsorheader').innerHTML = sponsor_names[currentAd1];

  $j("#adBanner1").fadeIn(2000).delay(5000).fadeOut(1500, function(){
   currentAd1++;
 cycle1();
  });
}
cycle1();
// ]]></script>



<script type="text/javascript">// <![CDATA[
var partner_img = new Array("http://www.brownfieldscanada.com/images/brown-images/partners/BuildingLogo-2.jpg",
"http://www.brownfieldscanada.com/images/brown-images/partners/NRU-Publishing_logo.jpg",
"http://www.brownfieldscanada.com/images/brown-images/partners/haz_mat.jpg",
"http://www.brownfieldscanada.com/images/brown-images/partners/oppi_logo_blue_with_tag.jpg",
"http://www.brownfieldscanada.com/images/brown-images/partners/renew_logo.jpg",
"http://www.brownfieldscanada.com/images/brown-images/partners/DCN.jpg");

var partner_lnks = new Array("http://www.building.ca/", "http://www.nrupublishing.com/", "http://www.hazmatmag.com/",
"http://www.ontarioplanners.on.ca/",
"http://renewcanada.net/", "http://www.dailycommercialnews.com/");

var partner_alt = new Array("Building.ca - Parter for Ontario Brownfields Regulatory Summit", "NRU Publishing - Partner for Ontario Brownfields Regulatory Summit", "HazMat Management Magazine - Partner for Ontario Brownfields Regulatory Summit", "The Ontario Professional Planners Institute - Partner for Ontario Brownfields Regulatory Summit", "Renew Canada - Partner for Ontario Brownfields Regulatory Summit", "Daily Commercial News and Construction Record - Partner for Ontario Brownfields Regulatory Summit");

var partner_title = new Array("Real Estate Development • Construction • Architecture", "NRU Publishing", "HazMat Management Magazine", "The Ontario Professional Planners Institute", "ReNew Canada", "Daily Commercial News and Construction Record");

var partner_name = new Array("Partner:","Partner:","Partner:","Partner:","Partner:", "Partner:");

var partner_num = 0;
var partner_total = 6;
function partnerCycle() {
  if (partner_num == partner_total) {
    partner_num = 0;
  }
var partnerBanner = document.getElementById('partnerBanner');
var link1 = document.getElementById('partnerLink');
  partnerBanner.src=partner_img[partner_num];
  partnerBanner.alt=partner_alt[partner_num];
  document.getElementById('partnerLink').href=partner_lnks[partner_num];
  document.getElementById('partnerLink').title=partner_title[partner_num];
  document.getElementById('partnerheader').innerHTML="<strong>"+partner_name[partner_num]+"</strong>";

  $j("#partnerBanner").fadeIn(2000).delay(3000).fadeOut(1500, function(){
  partner_num++;
  partnerCycle();
 });
}

 partnerCycle();
// </script>

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about internet-explorer-7