Brice Burgess schrieb:
> I noticed that $('#form').submit(); does not call the "default" form 
> submit -- but rather will only execute a function if it has been 
> explicitly defined via $('#form').submit(function() {...});
> 
> Is this the desired behavior?
> 
> I've skirted the situation by using $('#form')[0].submit(); -- but would 
> have preferred the earlier method as it seems more jQ centric. Is it 
> possible to have the .submit() function use the vanilla DOM .submit() if 
> there aren't any specific events tied to the element(s)?
> 
> Here's my exact code (to *perhaps* provide a better understanding)
> <script type="text/javascript">
> $().ready(function() {
>     $('#orderForm select').change(function() {
>         $('#orderForm')[0].submit(); // how about $('orderForm').submit(); ?
>     });
> });
> </script>
> 
> Thanks!
> 
> ~ Brice


Just to note: that would break a lot of existing scripts and should not 
go into a maintenance version.

I'm not sure what is the right way to do it. I think it adds more 
overhead to jQuery, because it had to check for every event if such a 
vanilla event exists for a particular element.

I think, the reason for the often occuring confusion is the naming 
ambiguity.


-- 
Klaus

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to