why is the value of height() in chrome different with safari?

纵饮孤独 提交于 2019-12-04 05:35:58

问题


My script like this :

$.ajax({ 
    url: _url,
    type: 'GET', 
    dataType: "json",
    contentType: "application/json; charset=utf-8",
    success: function (result) {
        ...
    }
}).done(function () {
    for(var i=0;i<7;i++) {
        this["td"+i] = $('#bodychel-' + coachId + clubId + ' table tbody td:eq(' + (i) + ')').height();
        $('#bodychel-' + coachId + clubId + ' table thead th:eq(' + (i) + ')').css({ height: this["td"+i] });
    }
});

If I console.log(this["td"+i]);, the result is different between chrome and safari. the result of chrome is true

How can I solve this problem?

来源:https://stackoverflow.com/questions/58314988/why-is-the-value-of-height-in-chrome-different-with-safari

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!