You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.
I have 10 elements on one page in each do loop that should allow user to copy when someone clicks on button. I managed to add copy to clipboard functionality to rails using Zeroclipboard-rails gem. As I have multiple items on same page I have changed Id to Class.
But whenever I click on copy to clipboard button on any of 10 elements It selects the value of first item. How can I Fix This?
Here is the complete code. Thanks.
<button class='my_clip_button' data-clipboard-target='fe_text' data-clipboard-text='Default clipboard text from attribute' id='d_clip_button' title='Click me to copy to clipboard.'>
The code you've shown doesn't really correlate with your description of the scenario. For example, you said you have 10 clipped buttons but you've only shown the HTML for 1 of them.
Also, what is the intent of your "click" handler? It's very unclear to me.
Last but not least, this wouldn't be anything specific to the "zeroclipboard-rails" Gem, so ideally you should raise this question on the core ZeroClipboard repo instead.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have 10 elements on one page in each do loop that should allow user to copy when someone clicks on button. I managed to add copy to clipboard functionality to rails using Zeroclipboard-rails gem. As I have multiple items on same page I have changed Id to Class.
But whenever I click on copy to clipboard button on any of 10 elements It selects the value of first item. How can I Fix This?
Here is the complete code. Thanks.
The text was updated successfully, but these errors were encountered: