Jquery Resize Method Based on Browser Window Change
- 2021-07-16 01:38:15
- OfStack
As shown below:
When this representation occurs in the browser window, the resize function is triggered
// When the browser size changes, give id For main-container Set the minimum height of the container for
<script type="text/javascript">
$(function(){
$(window).resize(function(){
$("#main-container").css("min-height", $(window).height() - 343);
}).resize();
})
</script>