1

please help me with this problem.

I use ajax search on my site. I want to create an overlay div with class active that be displayed after ajax filling the field with results (height change). at the beginning I have an empty div element with height = 0

<div id="search-results" style="height: 0px;"></div>

After entering the search phrase, Ajax will fill this field with references.

<div id="search-results" style="height: 250px;"><a></a><a></a><a></a></div>

How do I detect this dynamic height change of this field? and conversely, if the amount is again changed to 0, the overlay div will disappear.

thx

Lubo
  • 169
  • 1
  • 14
  • When your ajax call fill the div then you can trigger a custom function/event and do whatever you want to do in that custom function / event. – Nitin Garg Apr 10 '16 at 10:26
  • http://googleweblight.com/?lite_url=http://stackoverflow.com/questions/172821/detecting-when-a-divs-height-changes-using-jquery&ei=cDLX36o4&lc=en-IN&s=1&m=937&host=www.google.co.in&ts=1460283512&sig=APY536xgZMyqOzkBWvrsFdQfYgDTz1234A – Nitin Garg Apr 10 '16 at 10:28
  • Read about mutation observers. – callback Apr 10 '16 at 11:22

0 Answers0