Why does Firefox return 0 as the value of $(window).height()

前端 未结 7 900
野性不改
野性不改 2021-01-04 12:41

It seems to me that Firefox ought to be better equipped to return the proper value when using $(window).height().

I am using jQuery 1.8.2. Is this a bug

相关标签:
7条回答
  • 2021-01-04 13:21

    Try the following code:

    $(function(){
      $(window).on('cwsObjectsShown', function() {
        alert($(this).height());
      });   
    });
    
    0 讨论(0)
提交回复
热议问题