返回载入图像时显示......登陆

载入图像时显示正在载入中的jQuery实现

阿神2016-11-08 11:01:50618
<script>
$(function () {
var img = new Image();
  $(img).load(function () {
    $(this).hide();
    $('#loader').removeClass('loading').append(this);
    $(this).fadeIn();
  }).error(function () {
  // notify the user that the image could not be loaded
}).attr('src', 'http://farm3.static.flickr.com/2405/2238919394_4c9b5aa921_o.jpg');
});
</script>


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送