$('#reply').css("padding-top", $('.post:visible').height()-35 + "px" );
What I'm doing is setting the CSS padding-top
value for #reply
to .post
's height.
The only way I can get this to work in my AngularJS project so far is to to this:
$(function() {
setTimeout(function () {
$('#reply').css("padding-top", $('.post:visible').height()-35 + "px" )
},300)
});
How would I do it the Angular way, for example maybe something like this with the code being some kind of angular.copy
? Or can I just keep using jQuery. If so how would I make it fire when AngularJS is done, so I don't need a timeout function?
<div id="#reply" ng-style="{'padding-top' : code_that_returns_.post:visible's_height }">