I know the jQuery animate function, and I can change the divs height with that smoothly, but the question is:
I have a div:
<div class="blah">Content with 3 lines</div>
And then I append some more lines to the above div using jQuery, the div height is auto so it's gonna go longer, but not smoothly, is there anyway it could go longer smoothly like using jQuery animate function?
I just don't want to type animate({blah}) on any appends, ajax calls, etc..
Is it possible to have a function to get called on every divs height changes? and deal with it using animate function?
I have also read about transitions, so I did:
.blah{
-webkit-transition: height 1s ease-in-out !important;
-moz-transition: height 1s ease-in-out !important;
-ms-transition: height 1s ease-in-out !important;
-o-transition: height 1s ease-in-out !important;
transition: height 1s ease-in-out !important;
}
but not working
The jQuery method, which appends data:
$('blah').append('<p style="clear:both;">Another Line</p>')
Thanks in advance
Another Line
')` – behz4d Apr 20 '14 at 18:20