Link to home
Start Free TrialLog in
Avatar of CAMPzxzxDeathzxzx
CAMPzxzxDeathzxzx

asked on

I need JQuery or javascript to copy 1 column to the clipboard

I want to write some JQuery or javascript that will make clickable the first column (currency) in this table and copy the text from column two (Wallet) to the clipboard.  I need it to work for most browsers and IOS / Android.

This is a JQuery datatable in an ASP.Net / Razor environment.

<table id="dt_LiveCoinWallets" class="table table-striped table-bordered table-hover table-condensed">
                            <thead>
                                <tr>
                                    <th title="Click to select column">
                                        <h3>Copy</h3>
                                    </th>
                                    <th>
                                        <h3>Your Wallet Address</h3>
                                    </th>
                                </tr>
                            </thead>
                            @foreach (var item in Model)
                            {
                                <tr>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.Currency)
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.Wallet)
                                    </td>
                                </tr>
                            }
                        </table>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CAMPzxzxDeathzxzx
CAMPzxzxDeathzxzx

ASKER

Works like a champ.  Thank you!
You are welcome.