Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
64
rated 0 times [  67] [ 3]  / answers: 1 / hits: 49171  / 14 Years ago, thu, july 22, 2010, 12:00:00

I have a form that detects if all the text-fields are valid on each keyup() and focus(); if they're all valid, it will enable the submit button for the user to press. However, if the user fills in one of the text inputs with a browsers autocomplete feature, it prevents the submit button from being enabled.



Is there a way to detect if any of the input has changed regardless of how it's been changed, using jQuery?


More From » jquery

 Answers
111

The jQuery change event will only fire on blur. The keyup event will fire as you type. Neither fire on clicking an auto-completion option. I am also searching for a way to detect this, but I'm currently going with



$(selector).bind(change keyup,function(){
//Do something, probably with $(this).val()
});


But it doesn't quite solve the problem...


[#96139] Tuesday, July 20, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
morganm

Total Points: 626
Total Questions: 95
Total Answers: 95

Location: South Sudan
Member since Sun, Jul 11, 2021
3 Years ago
;