Saying that I have this HTML form:
<form id="form">
<input id="input_el" type="text">
<input id="submit_el" type="submit">
</form>
I want to get the form element starting from one of its input elements, so I could write:
<script type="text/javascript">
$('#input_el').form().validate();
$('#submit_el').form().submit();
</script>
That is, $('#input_el').form() should return $('#form') . Is that possible?
Thanks!
You can easily do