On Android there is the OnLongClickListener
method in which you can hold your finger on a View
and an action is triggered (if the developer sets an action) if that click stays for a little over 1 second. p>
I have this small table below with 4 colors. In JavaScript what would be the best way to do this "long click" action while holding down the cursor in some color? For example, display a% color of% with the color pressed.
<table>
<tbody>
<tr>
<td style="width: 24px; background-color: black;"> </td>
<td><span>black</span> = "#000000"</td>
<td style="width: 24px; background-color: green;"> </td>
<td><span>green</span> = "#008000"</td>
</tr>
<tr>
<td style="width: 24px; background-color: silver;"> </td>
<td><span>silver</span> = "#C0C0C0"</td>
<td style="width: 24px; background-color: lime;"> </td>
<td><span>lime</span> = "#00FF00"</td>
</tr>
</tbody>
</table>