2011-06-23 10 views
0

私はサイトで作業しています。私がIEの編集を始めるまで。私のjQueryのため、IE7でページが壊れています。これは複数のプラグインを持つWordPressプラットフォームですが、プラグインを一度に1つずつ無効にしています。 jQueryをコンフリクトモードにしても、まだ成功していません。どんな助けでも大歓迎です。私は下に私のjQueryを含めました、サイトのURLはhttp://prospermodels.comです。あなたが私を助けても大丈夫なら、私はあなたに管理者のアクセスを得ることができます。jQueryはIE7でページを破損させ、他のすべてのブラウザで正常に動作します

/* BELOW/

jQuery(document).ready(function() { 
    jQuery(".heat").after("<div class='heatD' style='display: none;'>Heat Description which is available in the jQuery in the footer.</div>"); 
    jQuery('.heat').hover(function() { 
     jQuery('.heatD').show(); 
     jQuery(".heatD").css("margin-bottom", 300); 
     }, function() { 
      jQuery('.heatD').hide(); 
     }); 
    jQuery(".cold").after("<div class='coldD' style='display: none;'>Heat Description which is available in the jQuery in the footer.</div>"); 
    jQuery('.cold').hover(function() { 
     jQuery('.coldD').show(); 
     jQuery(".coldD").css("margin-bottom", 300); 
    }, function() { 
     jQuery('.coldD').hide(); 
    }); 
    jQuery(function(jQuery) { 
     var slide = false; 
     var height = jQuery('#wordd').height(); 
     jQuery('#footer_button').click(function() { 
      var docHeight = jQuery(document).height(); 
      var windowHeight = jQuery(window).height(); 
      var scrollPos = docHeight - windowHeight + height; 
      jQuery('#wordd').animate({ height: "toggle"}, 400); 
      if(slide == false) { 
       if(jQuery.browser.opera) { //Fix opera double scroll bug by targeting only HTML. 
        jQuery('html').animate({scrollTop: scrollPos+'px'}, 400); 
       } else { 
        jQuery('html, body').animate({scrollTop: scrollPos+'px'}, 400); 
       } 
       slide = true; 
      } else { 
       slide = false; 
      } 
     }); 

    }); 
    jQuery(function(){ 
     var footerHeight = jQuery("#foot").height(); 
     var footerHeight2 = footerHeight + 40; 
     var moree = footerHeight/4; 
     var mentrymore = footerHeight/2; 
     jQuery("#wrapper").css("margin-bottom", -moree); 
    }); 
    jQuery("#right").stickyfloat({lockBottom: false, startOffset: 180}); 
    var i = 0; 
    jQuery('.alignleft').each(function() { 
     var me = this; 
     jQuery(this).hide() 
     var j = i; 
     setTimeout(function() { 
      jQuery(me).fadeIn(1000); 
     }, i) 
     i += 100 
    }); 
    if ((jQuery("#formBuilderContact").css("display")) == "none") { 
     jQuery("#formBuilderContact").css({display:"none"}); 
     jQuery("#formula1").click(function() { 
     jQuery("#formBuilderContact").fadeIn(); 
     jQuery("#formula1").css({display:"none"}); 
     }); 
    } 
    (function(jQuery) { 
     jQuery.fn.customFadeIn = function(speed, callback) { 
      jQuery(this).fadeIn(speed, function() { 
      if(jQuery.browser.msie) 
       jQuery(this).get(0).style.removeAttribute('filter'); 
      if(callback != undefined) 
       callback(); 
      }); 
     }; 
     jQuery.fn.customFadeOut = function(speed, callback) { 
      jQuery(this).fadeOut(speed, function() { 
      if(jQuery.browser.msie) 
       jQuery(this).get(0).style.removeAttribute('filter'); 
      if(callback != undefined) 
       callback(); 
      }); 
     }; 
    })(jQuery); 
    if(!jQuery.browser.msie){ // IE - 2nd level Fix 
     jQuery("ul.topnav").css({opacity:"0.95"}); 
    } 
    jQuery(".nav > li > ul").css({display: "none"}); 
    jQuery(".nav > li > ul > li > ul").css({display: "block"});// Opera Fix 
    jQuery("ul.nav li.current_page_ancestor ul.children").css({display: "block"}); 
    jQuery("ul.children").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav 
    jQuery("ul.nav li a").hover(function() { 
     var plug = jQuery(this).parent().find("ul.children"); 
     plug.customFadeIn(); 
     jQuery(this).parent().hover(function() { 

     }, function(){ 
      jQuery(this).parent().find("ul.children").customFadeOut(200); //When the mouse hovers out of the subnav, move it back up 
     }); 
     //Following events are applied to the trigger (Hover events for the trigger) 
     }).hover(function() { 
      jQuery(this).addClass("subhover"); //On hover over, add class "subhover" 
     }, function(){ //On Hover Out 
      jQuery(this).removeClass("subhover"); //On hover out, remove class "subhover" 
    }); 
    if(!(jQuery.browser.msie)) {       
     jQuery('div.grow').divgrow({ initialHeight: 75, moreText: "+ read more", lessText: "- show less", showBrackets: false}); 
    } 
    else { 
     jQuery('div.grow').divgrow({ initialHeight: 85, moreText: "+ read more", lessText: "- show less", showBrackets: false}); 
    } 
    if(!(jQuery.browser.msie)) {       
     jQuery('div.grow2').divgrow({ initialHeight: 83, moreText: "+ read more", lessText: "- show less", showBrackets: false}); 
    } 
    else { 
     jQuery('div.grow2').divgrow({ initialHeight: 88, moreText: "+ read more", lessText: "- show less", showBrackets: false}); 
    } 
    function slideSwitch() { 
     var active = jQuery('#slideshow IMG.active'); 
     if (active.length == 0) active = jQuery('#slideshow IMG:last'); 
     var next = active.next().length ? active.next() 
     : jQuery('#slideshow IMG:first'); 
     active.addClass('last-active'); 
     next.css({opacity: 0.0}) 
     .addClass('active') 
     .animate({opacity: 1.0}, 1000, function() { 
      active.removeClass('active last-active'); 
     }); 
     textSwitch(); 
    } 
    var totPics = "<?= $totPics ?>"; 
    var activeDiv = 2; 
    var text1 = "<?= $text1 ?>"; 
    var text2 = "<?= $text2 ?>"; 
    var text3 = "<?= $text3 ?>"; 
    var text4 = "<?= $text4 ?>"; 
    function textSwitch() { 
     if (activeDiv <= totPics) { 
      if (activeDiv == 1) { 
       jQuery('#div<? echo $totPics ?>').fadeOut('slow', function() { 
       jQuery('#div1').css({display: 'inline-block'}) 
       jQuery("#div1").fadeIn("slow"); 
      }); 
      activeDiv++; 
      } 
      else if (activeDiv == 2) { 
       jQuery('#div1').fadeOut('slow', function() { 
        jQuery('#div2').css({display: 'inline-block'}) 
        jQuery("#div2").fadeIn("slow"); 
       }); 
       activeDiv++; 
      } 
      else if (activeDiv == 3) { 
       jQuery('#div2').fadeOut('slow', function() { 
        jQuery('#div3').css({display: 'inline-block'}) 
        jQuery("#div3").fadeIn("slow"); 
       }); 
       activeDiv++; 
      } 
      else if (activeDiv == 4) { 
       jQuery('#div3').fadeOut('slow', function() { 
        jQuery('#div4').css({display: 'inline-block'}) 
        jQuery("#div4").fadeIn("slow"); 
       }); 
       activeDiv = 1; 
      } 
     } 
     else { 
      activeDiv = 1; 
      textSwitch(); 
     } 
    } 
    jQuery(function() { 
     if (totPics > 0) {  
      setInterval("slideSwitch()", 5000); 
     } 
    }); 
    /*HOVER INTENT COPY AND PASTED */ 
    (function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery); 

}); 
+0

何が壊れていますか?エラーが出ますか?もっと情報が必要になる。 –

+0

オープン|| f12 dev-toolsをダウンロードし、エラーが出るかどうかを確認してください。 – adardesign

+0

ページは表示されますが、jqueryは実際には動作しません。 navはjqueryによって制御され、現在のページのサブページだけでなく、クリック時に実際にポップアップするポップアップフッターを表示するのではなく、すべてのリンクを表示します。 – Gregg

答えて

0

jQueryのCODE私はjQueryのIE7で動作するように失敗したウェブサイトを持っています。あなたのコードには何も問題はありません。あなたが行ったのと同じコードを他の人に作ってもらうことができない限り、これを修正することはできません。

関連する問題