You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
547 B
JavaScript
18 lines
547 B
JavaScript
5 years ago
|
$(function() {
|
||
|
//复制
|
||
|
$(".redeem>a").click(function(){
|
||
|
var qrcodeLink = $(this).parent().children("div").children("span").text();
|
||
|
var clipboard = new Clipboard('.redeem>a', {
|
||
|
text: function() {
|
||
|
return qrcodeLink;
|
||
|
}
|
||
|
});
|
||
|
clipboard.on('success', function(e) {
|
||
|
console.log("复制成功");
|
||
|
});
|
||
|
|
||
|
clipboard.on('error', function(e) {
|
||
|
console.log("复制失败");
|
||
|
});
|
||
|
})
|
||
|
})
|