Passing in jQuery object doesn't work #121

frabcus opened this Issue Mar 20, 2013 · 2 comments


None yet

2 participants

frabcus commented Mar 20, 2013

The documentation says you can do this:

new ZeroClipboard($("#d_clip_button"), { moviePath: "new/path", text: "Copy me!" })

It doesn't work - if using jQuery we've found we have to get the underlying DOM object, e.g. by doing [0]:

new ZeroClipboard($("#d_clip_button")[0], { moviePath: "new/path", text: "Copy me!" })

Either the documentation needs updating to make it clear it needs a DOM element, or the code changing to detect jQuery objects.


What version are you using? This should work just fine since v1.1.6 (so v1.1.6, v1.1.7, and current master so far) as it just loops through the array.



Closing unless the OP can provide more proof.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment