Giter Club home page Giter Club logo

jquery-zclip's Introduction

jquery.zclip1x.js 基于 zeroclipboard v1.x 支持到IE6和其他浏览器
jquery.zclip2x.js 基于 zeroclipboard v2.x 支持IE9+和其他浏览器

鉴于国内的浏览器环境,还是推荐选择 jquery.zclip1x.js.

安装

依赖于zeroclipboard 1.3.5版本(最稳定,无bug)

<script src="zeroclipboard.135.js"></script>
<script src="jquery.zclip1x.js"></script>

使用

$copy = $('#copy-btn').zclip({
    beforeCopy: function () {
        // beforeCopy
    },
    copy: function () {
        console.log(this); // #copy-btn
        return '要复制的内容';
    },
    afterCopy: function () {

        console.log('after Copy');
    }
});

  • 鼠标显示的是跟flash的交互(作用是要跟flash进行交互的,不能被别人给挡了),在zeroclipboard创建的html桥和object上加cursor:pointer不生效。zeroclipboard是通过js调用flash,flash来显示一个pointer。

参考

jquery-zclip's People

Contributors

zzuhan avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.