zClip jQuery Plugin copy self attribute on click -
i trying use zclip jquery plugin (http://www.steamdev.com/zclip/#features) , wanting copy attribute of link being clicked on.
essentially need copy url clipboard on click, not working.
$('a.activation_copy_link').zclip({ path: "<%= asset_path('zeroclipboard.swf') %>", copy: $(this).data('link') }); html markup:
<a href="#" class="activation_copy_link" data-link="activation_url_here">click copy link</a> i understand $(this) refer zclip object , not jquery object, have tried can think of , it's not working.
$('a.activation_copy_link').each(function() { var $this = $(this); $(this).zclip({ path: "<%= asset_path('zeroclipboard.swf') %>", copy: $this.data('link') }); });
Comments
Post a Comment