Jquery选择器事件绑定在IE8中不起作用

时间:2014-06-24 08:16:03

标签: jquery css html-table jquery-selectors toggle

我使用以下代码切换子行。它在IE8以外的所有浏览器中都能完美运行。我不确定是什么问题。尝试了各种版本的jquery。在IE8开发人员工具上检查时,断点不会触及下面的事件。对于事件绑定或jquery选择器,应该是错误。

我正在使用Jquery 1.9

 var js = jQuery.noConflict();
    js(document).ready(function () {
        js("#offersTable tr.odd .arrow").click(function () {
            js(this).closest("tr").next("tr").slideToggle();
            js(this).closest("tr").find(".arrow").toggleClass("up");
        });

        js("#offersTable tr.even .arrow").click(function () {
            js(this).closest("tr").next("tr").toggle();
            js(this).closest("tr").find(".arrow").toggleClass("up");
        });
 });




<style type="text/css">
    body
    {
        font-family: Arial, Helvetica, Sans-Serif;
        font-size: 0.8em;
    }
    #offersTable
    {
        border-collapse: collapse;
    }
    #offersTable h4
    {
        margin: 0px;
        padding: 0px;
    }
    #offersTable img
    {
        float: right;
    }
    #offersTable ul
    {
        padding: 0px;
    }
    #offersTable td
    {
        padding: 7px 15px;
    }
    #offersTable tr .arrow
    {
        cursor: pointer;
    }
    #offersTable div.arrow
    {
        background: transparent url(./resource_files/arrows.png) no-repeat scroll 0px -16px;
        width: 16px;
        height: 16px;
        display: block;
    }
    #offersTable div.up
    {
        background-position: 0px 0px;
    }
    .offerSelectLA
    {
        text-align: left;
    }
</style>

请让我解决这个问题。

0 个答案:

没有答案
相关问题