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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -