javascript - How to expand height of the container div whenever child divs are expanded -


In my HTML page I have some & lt; Div & gt; s, which is also my requirement if I click on that link, its original container size is & lt; Div & gt; should be expanded (simply spreads as an andarean).

This is what I have tried to do:

  $ ('add-comment'). Height ($ ('div. Height () + $ (' div.stream-widgets-block-comment-box ') height ());}) ;   

The above statement adds the height of

, but the problem is that unless the code is executed, The altitude of
-1 ends. 1. Edit <1: This is JSFiddle Link - I've added a div to it, which is the height on the extension Uses the page (click on Add a comment to check extension

  $ ('height. Click on 'stream-widgets-block-comment-box') (function () {var vHight = $ ('div.extra'). Height (); $ ('Div.extra'). CSS ('height' You can use .css () and var.   

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -