I have a table like:
<table> <thead> <tr> <th>Hostname</th> <th>Action</th> </tr> </thead> <tbody> <tr> <td>127.0.0.1</td> <td><a name="delete" onclick="remove_host('127.0.0.1')">Remove</a></td> </tr> <tr> <td>127.0.0.2</td> <td><a name="delete" onclick="remove_host('127.0.0.2')">Remove</a></td> </tr> <tr> <td>127.0.0.3</td> <td><a name="delete" onclick="remove_host('127.0.0.3')">Remove</a></td> </tr> </tbody>
What I'm trying to do is when the user clicks Delete , that the link is replaced with one of these downloadable images, so the user cannot click the link repeatedly.
How do I get the element a , so to speak, so I can set the HTML accordingly using jQuery?
In other parts of the site, I can connect rel="host-1" (or the like) to the link, so I can easily link to it to change the HTML.
source share