jQuery 头像插件 Tapatar

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-04 09:59:28

软件介绍

Tapatar 是一个轻量级、易扩展的 jQuery 插件,它可以让用户从社交网络、磁盘或者其他资源中获取头像。默认情况下,包括了 Gravatar,本地的和 Facebook 上的资源。Tapatar 很容易加入其他的资源。

示例代码:

Tptr.sources.placeKitten = new Tptr.TapatarSource({
  id: 'placeKitten',
  title: 'Placekitten',
  action: {
    content: 'Pick',
    onClick: function(evt) {
        if (this.image_data) {
          this.setImageData(this.image_data, true);
        }
    }
  },
  onAdd: function() {
    var url = 'https://placekitten.com/g/200/300';
    var self = this;
    this.downloadImage(url, function(dataUri){
        if (dataUri) {
          self.setImageData(dataUri);
        } else {
          try {
            self.delegate.options.sources.placeKitten.enabled = false;
          } catch(err) {}
        }
    })
  },
});

本文地址:https://codercto.com/soft/d/22628.html

Numerical Methods and Methods of Approximation in Science and En

Numerical Methods and Methods of Approximation in Science and En

Karan Surana / CRC Press / 2018-10-31

ABOUT THIS BOOK Numerical Methods and Methods of Approximation in Science and Engineering prepares students and other readers for advanced studies involving applied numerical and computational anal......一起来看看 《Numerical Methods and Methods of Approximation in Science and En》 这本书的介绍吧!

SHA 加密
SHA 加密

SHA 加密工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具