2010-01-24 4 views
0

Может ли кто-нибудь увидеть что-нибудь конкретное, что вызовет проблемы с jQuery в ie6? Никакие элементы jQuery не загружаются вообще в ie6. ВСЕ ДРУГИЕ БРАУЗЕРЫ ИСКУСНЫ !!!! Большое вам спасибо за вашу помощь!IE6 jQuery problem

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<title>{tag_pagetitle}</title> 
<script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script> 
<script type="text/javascript" src="/js/jquery-ui-1.7.custom.min.js"></script> 
<link rel="stylesheet" href="/stylesheets/tabs.css" type="text/css" media="screen, projection" /> 
<link href="/stylesheets/main.css" rel="stylesheet" type="text/css" /> 
<link href="/stylesheets/gallery-1.0.1.css" rel="stylesheet" type="text/css" /> 
<link href="/stylesheets/forms.css" rel="stylesheet" type="text/css" /> 
<link href="/facebox/facebox.css" rel="stylesheet" type="text/css" /> 
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> 
<!--[if IE]> 
<link type="text/css" rel="stylesheet" href="/stylesheets/ie.css" bc="1" /> 
<![endif]--> 
<!--[if IE 6]> 
<link type="text/css" rel="stylesheet" href="/stylesheets/ie6site.css" bc="1" /> 
<![endif]--> 
</head> 
<body id="gallerydetail"> 
<div id="site"><img src="http://thecreativealliance.org/images/top-corners_03.gif" width="900" height="3" alt="" /> 
    <div id="banner"><img alt="" src="http://thecreativealliance.org/images/site/creative-alliance-logo.jpg" /> 
    <div id="logout" class="login-reg-link">{module_whosloggedin,/login}</div> 
    <h1>Showcase Gallery</h1> 
    </div> 
    <div id="menu"> {module_menu,550428} 
    <script type="text/javascript" src="http://cdn.socialtwist.com/2010010232558-1/script.js"></script> 
    <a class="st-taf" href="http://tellafriend.socialtwist.com:80" onclick="return false;" style="border:0;padding:0;margin:0;"><img alt="SocialTwist Tell-a-Friend" style="border:0;padding:0;margin:0;" src="http://images.socialtwist.com/2010010232558-1/button.png" onmouseout="STTAFFUNC.hideHoverMap(this)" onmouseover="STTAFFUNC.showHoverMap(this, '2010010232558-1', window.location, document.title)" onclick="STTAFFUNC.cw(this, {id:'2010010232558-1', link: window.location, title: document.title });" /></a> 
    <div class="header-search"> 
     <form name="catsearchform1870" method="post" action="/Default.aspx?SiteSearchID=852&ID=/search-results.htm" class="cmxform"> 
     <fieldset> 
      <ol> 
      <li> 
       <input class="cat_textbox_smallish" type="text" name="CAT_Search" id="CAT_Search" value="Search" onblur="if (this.value == '') {this.value = 'Search';}" onfocus="if (this.value == 'Search') {this.value = '';}" /> 
      </li> 
      <li> 
       <input type="image" src="/images/go-btn_12.png" class="login-button" value="Search" /> 
      </li> 
      </ol> 
     </fieldset> 
     </form> 
    </div> 
    </div> 
    <div class="gallery-cont">{tag_pagecontent} 
    <div class="clr"></div> 
    </div> 
    <div class="clr" id="footer"> {module_contentholder,6762} 
    <div class="clr"></div> 
    </div> 
</div> 
<script src="/facebox/facebox.js" type="text/javascript"></script> 
<script type="text/javascript" src="/js/jquery.trilemma.js"></script> 
<script type="text/javascript" src="/js/jquery.truncate-2.3-pack.js"></script> 
<script type="text/javascript" src="/js/jquery.galleriffic.js"></script> 
<script type="text/javascript"> 
    jQuery(document).ready(function($) { 
     $('a[rel*=facebox]').facebox({ 
     loading_image : 'loading.gif', 
     close_image : 'closelabel.gif' 
     }) 
      $(".email").each(function(){ 
      var ats, dots, address, i; 
      ats = [ ' at ', ' (at) ', ' [at] ' ]; 
      dots = [ ' dot ', ' (dot) ', ' [dot] ' ]; 
      address = $(this).html(); 
      for (i = 0; i < ats.length; i++) { 
       address = address.replace(ats[i], '@'); 
      } 
      for (i = 0; i < dots.length; i++) { 
       address = address.replace(dots[i], '.'); 
      } 
      $(this).html('<a href="mailto:' + address + '">' + address + '</a>'); 
     }); 
    $('.twitswitch').each(function() { 
    var $twitswitch = $(this); 
    if ($twitswitch.text() == '') { 
     $('#twitterlink').hide(); 
    } 
    }); 
    $('.linkswitch').each(function() { 
    var $twitswitch = $(this); 
    if ($twitswitch.text() == '') { 
     $('#linkedinlink').hide(); 
    } 
    }); 
    $('.faceswitch').each(function() { 
    var $twitswitch = $(this); 
    if ($twitswitch.text() == '') { 
     $('#facebooklink').hide(); 
    } 
    }); 
if($(".twitswitch").html() == "" && $(".linkswitch").html() == "" && $(".faceswitch").html() == "") { 
     $("#orconnect").hide(); 
    } 
if ($("#appswitch:contains('Yes')").length) { 
    $("#reviewhold,#fragment-4 ol,#fragment-4 .form-intros").hide(); 
    $(".cats-chosen").show(); 
} 
var $tabs = $('#tabs').tabs(); 

      $(".ui-tabs-panel").each(function(i){ 

       var totalSize = $(".ui-tabs-panel").size() - 1; 

       if (i != totalSize) { 
        next = i + 2; 
        $(this).append("<a href='#' class='next-tab mover' rel='" + next + "'><span>Next Page &#187;</span></a>"); 
       } 

       if (i != 0) { 
        prev = i; 
        $(this).append("<a href='#' class='prev-tab mover' rel='" + prev + "'><span>&#171; Prev Page</span></a>"); 
       } 

      }); 

      $('.next-tab, .prev-tab').click(function() { 
        $tabs.tabs('select', $(this).attr("rel")); 
        return false; 
       }); 
      $('.tofour').click(function() { // bind click event to link 
    $tabs.tabs('select', 4); // switch to fifth tab 
    return false; 
}); 
}); 
</script> 
<script type="text/javascript"> 
$(function(){ 
    jQuery('.select-cats').trilemma({max:3,disablelabels:true}); 
}); 
</script> 
<script type="text/javascript"> 
jQuery(document).ready(function($) { 
if ($("#logout:contains('Log out')").length) { 
    $("#logout").append(' or <a href="/manage">Edit Showcase</a>'); 
} 
if ($(".show-form-cont h2:contains('Add your Showcase')").length) { 
    $("#banner h1").html('Showcase Management'); 
} 
if ($(".show-form-cont h2:contains('Edit your Showcase')").length) { 
    $("#banner h1").html('Showcase Management'); 
} 
}); 
    jQuery(document).ready(function($) { 
    var gallery = $('#thumbs').galleriffic({ 
     delay:      3000, // in milliseconds 
     numThumbs:     20, // The number of thumbnails to show page 
     preloadAhead:    40, // Set to -1 to preload all images 
     enableTopPager:   false, 
     enableBottomPager:   true, 
     maxPagesToShow:   7, // The maximum number of pages to display in either the top or bottom pager 
     imageContainerSel:   '#slideshow', 
     controlsContainerSel:  undefined, 
     captionContainerSel:  '#caption', 
     loadingContainerSel:  '#loader', 
     renderSSControls:   true, // Specifies whether the slideshow's Play and Pause links should be rendered 
     renderNavControls:   true, // Specifies whether the slideshow's Next and Previous links should be rendered 
     playLinkText:    'Play', 
     pauseLinkText:    'Pause', 
     prevLinkText:    'Previous', 
     nextLinkText:    'Next', 
     nextPageLinkText:   'Next &rsaquo;', 
     prevPageLinkText:   '&lsaquo; Prev', 
     enableHistory:    false, // Specifies whether the url's hash and the browser's history cache should update when the current slideshow image changes 
     enableKeyboardNavigation: true, // Specifies whether keyboard navigation is enabled 
     autoStart:     false, // Specifies whether the slideshow should be playing or paused when the page first loads 
     syncTransitions:   false, // Specifies whether the out and in transitions occur simultaneously or distinctly 
     defaultTransitionDuration: 1000, // If using the default transitions, specifies the duration of the transitions 
     onSlideChange:    undefined, // accepts a delegate like such: function(prevIndex, nextIndex) { ... } 
     onTransitionOut:   undefined, // accepts a delegate like such: function(slide, caption, isSync, callback) { ... } 
     onTransitionIn:   undefined, // accepts a delegate like such: function(slide, caption, isSync) { ... } 
     onPageTransitionOut:  undefined, // accepts a delegate like such: function(callback) { ... } 
     onPageTransitionIn:  undefined, // accepts a delegate like such: function() { ... } 
     onImageAdded:    undefined, // accepts a delegate like such: function(imageData, $li) { ... } 
     onImageRemoved:   undefined // accepts a delegate like such: function(imageData, $li) { ... } 
    }); 
}); 

</script> 
{module_contentholder,8514} 
</body> 
</html> 
+2

Вам действительно нужно научиться публиковать более узкие и сжатые вопросы и сузить код примера на * много *. – ironfroggy

+0

Точно, мы не собираемся сидеть сложа руки и отлаживать это для вас. – ChaosPandion

+0

Думал, что это может показаться некоторым. Я слышал, что .html() может повредить вещи в jQuery. Спасибо за ваше время в любом случае. – Jackson

ответ

0

У вас должен быть установлен IE Inspector на вашей машине для отладки, чтобы проверить ваше дерево HTML. Есть вероятность того, что некоторые HTML были плохими, вызывают глупый IE6, чтобы вести себя странно. Если это не поможет, включите Script Debug в Visual Studio, попробуйте ввести инструкцию отладчика где-нибудь в вашем коде и начните переходить через фрагмент кода.

1

Убедитесь, что все, что вы JavaScript, верны. У меня такое чувство, что jQuery загружается отлично, но js перестает работать после того, как он дойдет до определенной точки.

Пример: В первой строке вашего сообщения js у вас есть вызов facebox, который не заканчивается точкой с запятой.

<script type="text/javascript"> 
    jQuery(document).ready(function($) { 
     $('a[rel*=facebox]').facebox({ 
     loading_image : 'loading.gif', 
     close_image : 'closelabel.gif' 
     }) 

Я бы проверял, чтобы не было более глупых синтаксических ошибок.

+0

Большое спасибо. Сейчас я изучаю методы отладки jQuery. Какие-нибудь советы по правильному подходу здесь? Легко следовать методу ??? – Jackson

+0

К сожалению, т. Е. На самом деле не имеет таких хороших инструментов, как firefox (firebug), который позволяет вам шаг за шагом через js видеть, где лежат ошибки. Вы можете попробовать панель инструментов разработчика Internet Explorer - http://www.microsoft.com/downloadS/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en (правда, я ее никогда не использовал). – munch

+0

Спасибо за ваше время. Действительно ценю это. Не исправлена ​​проблема, но я решил не поддерживать IE6 в этом проекте. Это не в их бюджете для меня, чтобы это так много ввязываться. – Jackson