Jquery 最大高度

    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Document</title>
    </head>
    <body>
        <div style="height:100px;"></div>
        <div style="height:200px;"></div>
        <div style="height:220px;"></div>
        <div style="height:130px;"></div>
        <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
        <script>
            (function($){
                $.fn.maxHeight = function(){
                    var max = 0;
                    this.each(function(){
                        max = Math.max(max,$(this).height())
                    })
                    return max;
                }
            })(jQuery)
            console.log( $("div").maxHeight() )
        </script>
    </body>
    </html>
原文地址:https://www.cnblogs.com/ar13/p/8185623.html