Search code examples
resizewindowheight

Can i put an "Element, class or id" instead of "window" in this case?


$(window).resize(function(){
                $('.container').css('height', $(window).height());
            });

Can i get the resized(changed) height of .container?

It doesnt work.

.css('height', $(".container").height());

Solution

  • Try this:

    .css('height',$('.container').height($(window).height()));