Testcase for jQuery Ticket 7356
by jitter
HTML
<form action=".">
<a name="btn_edit" class="btn edit">Click me</a>
<p><input name="action" type="text" value="action text input" /></p>
</form>
CSS
/* just eye candy irrelevant to test case */
a:hover, a:active {
text-decoration: underline;
}
a {
color: #1111cc;
text-decoration: none;
}
JavaScript
$("a[name='btn_edit'].btn.edit").click(function(event) {
event.preventDefault();
var form = $(this).parents('form:first');
alert($("input[name='action']", form).val());
});