javascript - AngularJS watch element height -


i trying watch element height in angularjs this:

$scope.$watch(function(){return $("#content").outerheight()},      function(){$("#sidebar").outerheight($("#content").outerheight())},     true); 

the function being called , update #sidebar height. however, when #content height change, doesn't update #sidebar height. change when $apply() triggered.

how can make #sidebar height updated #sidebar height changing?


Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -