I need to pause for maybe 500 miliseconds before I submit a form. Here is what I have so far:
$(".rowqty input").bind("keyup", function() { $("#ViewCartPage form").animate({ opacity: 1.0 }, 3000).submit() });
so when someone changes the quantity of the input field it submits the form, but I want it to wait for a slight amount of time incase they need a moment to type 2 or 3 numbers.
As you can see I tried the animate function to try and delay things but with no luck.
I know I could use this: http://blog.mythin.net/projects/jquery.php
I'd rather not add another JS to my site if there is a way around it.
EDIT: Actually the pause plugin above is not working for me either.
2 Answers 2
Give this a shot:
$(".rowqty input").bind("keyup", function() { setTimeout("$('#ViewCartPage form').submit()", 500 });
3 Comments
setTimeout(function () {$("#formID").submit()},1000);
it works for me (no quotes)