JQuery - What is the reason why global variable isn't updated inside .on function?

后端 未结 0 1902
终归单人心
终归单人心 2020-12-03 13:09

I\'m trying to get the height of a div in real time and here is my code:

var height = 0;
$(window).on(\'load resize\', function(){
    height = $("#targe         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题