У меня есть несколько кнопок на странице, и я хочу смоделировать нажатие на кнопку СЛЕДУЮЩАЯ.
$('input, select').keydown(function(e){
if(e.which == 13)
//$('input[type*=button]').click();
$(this).next('input[type*=button]').click();
});
Html:
<tr>
<td class="cell">
<input type="text" name="domain" class="entryfield" value="http://">
</td>
</tr>
<tr>
<td class="cell" align="right" colspan="2">
<input type="button" class="button" value="Get IP" id="submitDomain"/>
</td>
</tr>
Код с комментариями работает, но при этом нажимаются все кнопки на странице.
Любая помощь приветствуется, спасибо.