В настоящее время я использую jquery, чтобы связать все td с ссылкой на редактирование, но я хочу, чтобы иметь возможность нацеливать td на класс редактирования, и мне нужна ссылка, чтобы найти тег с классом edit- действие.JQuery td click
Любая помощь будет замечательной!
Текущий код:
$("tr.edit").click(function(){
if(!clicking)
{
clicking = true;
$('a.edit-action', this).click();
clicking = false;
}
});
<table align="center" width="100%" id="Table" >
<tr>
<th width="20%">col 1</th>
<th width="20%">col 1</th>
<th width="25%">col 1</th>
<th width="25%">col 1</th>
<th width="10%">col 1</th>
</tr>
<tr class="edit">
<td width="20%" class="edit">name</td>
<td width="20%" class="edit">type</td>
<td width="25%">other 1</td>
<td width="25%">other 2</td>
<td width="10%" class="action"><a href="#" class="dialog edit-action">Edit</a><br>Another delete link here</td>
</tr>
</table>
Спасибо, сработало очарование! im довольно новый для jquery, поэтому спасибо за помощь. – 2009-08-26 20:20:29
'.live()' - новый Javascript. +1! – JorenB
.on() - новый живой()! –