Hi bcamp1973
I'm having similar issues with JQ1.6.4 and JQM1.0
Seems that my $("#form-id").submit() will only fire when it's in the $(document).ready() function.
If I
bind my submit or make it
live then the function is never triggered (I do this in a script *before* JQM is loaded).
It's just ridiculous how it's so hard to get JQM stuff working. So fiddly and time wasting tying to track down all the newonces/idiosyncrasies
JQM 1.0 docs says never use $(document).ready(). Use pageinit() instead. Well, it doesn't work for me with regard to form submission.
Side Note:
JQM TEAM - I'd like to see much more documentation than you have in place today, along with various case scenarios. I realise that the JQM library is an enormous (and complex) effort and it's freely given, but IMHO I feel the uptake of such technology will greatly improve if the documentation was clearer in some cases (and with dozens of examples). And yes, I have purchased several books on JQM and they all seem to have different opinions on how to do things (sorry - ranting over :)SummaryThis works:
- $(document).ready(function() {
- $("#frmSignIn").submit(function(){
- alert("Handler for sign in submit() called");
- return false; // don't submit the form
- });
-
});
This doesn't:
- $("#frmSignIn").bind("submit",function() {
- alert("Handler for sign in submit() called");
- return false; // don't submit the form
- });
This doesn't either:
- $("#frmSignIn").live("submit",function() {
- alert("Handler for sign in submit() called");
- return false; // don't submit the form
- });
I just don't get it.
Very VERY frustrating!!
=Mark