ilovexiaoming

 需要引入的文件:

    <script src="js/jquery.min.js"></script>
    <script src="js/jQuery.resizeEnd.min.js"></script>

代码调用:

    $(function(){
        $(window).on(\'resize\', function() {
            $(\'.txt h3\').text(\'调整中\');
        });
     
        $(window).resizeEnd({
            delay : 500
        }, function(){
            var $body = $(\'body\');
            var $ww = $(window).width();
            if($ww > 1500){
                $body.removeClass();
            } else if($ww < 1500 && $ww > 1000){
                $body.attr(\'class\', \'window-width-1000-to-1500\');
            } else if($ww < 1000){
                $body.attr(\'class\', \'window-width-lt1000\');
            }
            $(\'.txt h3\').text(\'调整完成\');
        });
        $(window).resizeEnd();
    });

 参考网址:http://www.dowebok.com/demo/119/

分类:

技术点:

相关文章:

  • 2021-04-28
  • 2021-12-15
  • 2021-09-21
  • 2022-01-18
  • 2021-12-03
  • 2021-05-25
  • 2022-01-16
猜你喜欢
  • 2021-12-12
  • 2022-02-23
  • 2021-05-02
  • 2021-05-10
  • 2022-12-23
相关资源
相似解决方案