Javascript jQuery应用程序完全锁定IE8 |在其他方面都可以正常工作

Javascript jQuery应用程序完全锁定IE8 |在其他方面都可以正常工作,javascript,jquery,internet-explorer-8,Javascript,Jquery,Internet Explorer 8,我正在为我的公司做一个ajax/jquery测试,它在Firefox、Chrome甚至Android中运行都没有问题。但是,当使用IE8运行时,它会锁定必须运行任务管理器才能结束IE进程的效果。我在不同的操作系统中尝试了不同的浏览器,唯一给我带来麻烦的就是Windows中的IE。Windows中的其他浏览器没有任何问题。我也试过几台不同的电脑 Ajax请求本身很好;我认为在用户选择答案后,隐藏/显示效果才是问题的根源。其他答案应该消失,一些基于用户答案的响应文本出现。相当标准。在IE中,响应文本

我正在为我的公司做一个ajax/jquery测试,它在Firefox、Chrome甚至Android中运行都没有问题。但是,当使用IE8运行时,它会锁定必须运行任务管理器才能结束IE进程的效果。我在不同的操作系统中尝试了不同的浏览器,唯一给我带来麻烦的就是Windows中的IE。Windows中的其他浏览器没有任何问题。我也试过几台不同的电脑

Ajax请求本身很好;我认为在用户选择答案后,隐藏/显示效果才是问题的根源。其他答案应该消失,一些基于用户答案的响应文本出现。相当标准。在IE中,响应文本会出现,但其他答案不会消失,然后IE会锁定

我试过使用Firebug Lite,但由于IE冻结到了如此大的程度,所以实际上无法从中获得任何反馈

下面是javascript,以及指向实时示例的链接


$(文档).ready(函数(){
var得分=0;
$('#getStarted')。单击(函数(){
$(“#指令”).hide('slow');
$('getStarted').hide('fast');
$.ajax({
url:“scripts/quizProgress.php”,
数据:“问题编号=1”,
成功:函数(xml){
var question=$(xml.find(“text:[type=question]”)text();
$(“#问题显示”)。追加(问题);
$('questionDisplay').show('slow');
$(xml).find(“answer”).each(函数(){
var id=$(this.attr('id');
var answerText=$(this.find(“text”).text();
var tbi=“

”+answerText+“

”; $(“#应答显示”)。追加(待定); var responseText=$(this.find('response').text(); var responseInsert=“

“+responseText+”

”; $(“#responseDisplay”).append(responseInsert); }); $('#answerDisplay')。show('slow'); } }); }); $('#answerDisplay')。悬停(函数(){ $(this).find('p').hover(函数(){ $(this.addClass(“answerHover”); },函数(){ $(this.removeClass('answerHover'); }); $(this)。查找('p')。单击(函数(){ if($(this.attr('correct')=='yes'){ 分数++; } var answer=$(this.attr('id'); var allAnswers=$(“#answerDisplay”).find('p'); $(allAnswers).每个(函数(){ if(answer!=$(this.attr('id')){ $(this.hide('slow'); } 否则{ $(this.addClass('selectedAnswer'); } var responseID=“re”+回答; $('#responseDisplay')。查找('p')。每个(函数(){ if($(this.attr('id')==responseID){ $(this.removeClass('hideResponse'); $(this.show('slow'); $(this.addClass('showResponse'); } }); }); }); }); });
记住,这只是一个问题,还没有完全的功能。我很犹豫是否继续,因为它在IE中造成了这么多的问题。我们的很多客户都是……我们可以说,他们不是精通电脑的人,IE包含了他们的很多浏览器

另外:这是我的第一个jQuery应用程序,所以我可能做了一些非常可怕的事情


谢谢你的帮助

我认为这可能与:

$(这个)。隐藏(“慢”)

你的国家环保总局
 <script type='text/javascript'>
                $(document).ready(function() {
                        var score=0;

                        $('#getStarted').click(function() {
                                $('#instructions').hide('slow');
                                $('#getStarted').hide('fast');
                                $.ajax({
                                        url: "scripts/quizProgress.php",
                                        data: "questionNumber=1",
                                        success: function(xml) {
                                                        var question = $(xml).find("text:[type=question]").text();
                                                        $('#questionDisplay').append(question);
                                                        $('#questionDisplay').show('slow');
                                                        $(xml).find("answer").each(function() {
                                                                var id = $(this).attr('id');
                                                                var answerText = $(this).find("text").text();
                                                                var tbi = "<p correct='";
                                                                if ($(this).find("correct").text() == '0') {
                                                                        tbi += "no";
                                                                }
                                                                else { tbi += "yes"; }
                                                                tbi += "' id='" + id + "'>" + answerText + "</p>";
                                                                $('#answerDisplay').append(tbi);
                                                                var responseText = $(this).find('response').text();
                                                                var responseInsert = "<p id='re"+id+"' class='hideResponse'>"+responseText+"</p>";
                                                                $('#responseDisplay').append(responseInsert);

                                                        });
                                                        $('#answerDisplay').show('slow');
                                                }


                                });
                        });

     $('#answerDisplay').hover(function() {
                                $(this).find('p').hover(function() {
                                        $(this).addClass("answerHover");
                                        }, function() {
                                        $(this).removeClass('answerHover');
                                });
                                $(this).find('p').click(function() {
                                        if ($(this).attr('correct')=='yes') {
                                        score ++;
                                        }
                                        var answer = $(this).attr('id');
                                        var allAnswers = $('#answerDisplay').find('p');
                                        $(allAnswers).each(function() {
                                                if (answer != $(this).attr('id')) {
                                                        $(this).hide('slow');
                                                }
                                                else {
                                                        $(this).addClass('selectedAnswer');
                                                }
                                        var responseID = "re"+answer;
                                        $('#responseDisplay').find('p').each(function() {
                                                if ($(this).attr('id')==responseID) {
                                                        $(this).removeClass('hideResponse');
                                                        $(this).show('slow');
                                                        $(this).addClass('showResponse');
                                                }
                                        });

                                        });
                                });
                        });

                });
var answer = $(this).attr('id');
var allAnswers = $('#answerDisplay').find('p');
$(allAnswers).each(function() {
    if (answer != $(this).attr('id')) {
        $(this).hide('slow');
    } else {
        $(this).addClass('selectedAnswer');
    }
$(this).addClass('selectedAnswer');
$('#answerDisplay').find('p').not('.selectedAnswer').hide('slow');
var score = 0;
var $answerDisplay = $('#answerDisplay');
var $responseDisplay = $('#responseDisplay');
var $questionDisplay = $('#questionDisplay');
var $instructions = $('#instructions');

$('#getStarted').click(function() {
    var $this = $(this);
    $this.hide('fast');

    $instructions.hide('slow');

    $.ajax({
        url: "scripts/quizProgress.php",
        data: "questionNumber=1",
        success: function(xml) {
            var question = $(xml).find("text:[type=question]").text();
            $questionDisplay.append(question);
            $questionDisplay.show('slow');

            $(xml).find("answer").each(function() {
                var $this = $(this);
                var id = $this.attr('id');
                var answerText = $this.find("text").text();
                var tbi = "<p correct='";

                if ($this.find("correct").text() == '0') {
                    tbi += "no";
                } else {
                    tbi += "yes";
                }

                tbi += "' id='" + id + "'>" + answerText + "</p>";

                $answerDisplay.append(tbi);

                var responseText = $this.find('response').text();
                var responseInsert = "<p id='re" + id + "' class='hideResponse'>" + responseText + "</p>";

                $responseDisplay.append(responseInsert);
            });

            $answerDisplay.show('slow');
        }
    });
});

$answerDisplay.find('p').hover(function() {
    $(this).addClass("answerHover");
}, function() {
    $(this).removeClass('answerHover');
}).click(function() {
    var $p = $(this);

    $p.addClass('selectedAnswer');

    if ($p.attr('correct') == 'yes') {
        score++;
    }

    $p.parent().find(':not(.selectedAnswer)').hide('slow');
    $responseDisplay.find('p#re' + $p.attr('id')).removeClass('hideResponse').show('slow').addClass('showResponse');
});