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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -