My problem seems simple: When hosting my own JQuery (unedited, latest version), my Ajax calls work fine, however, when I try to replace it with the one hosted by Google or jquery.com, ajax calls do not occur upon form submission and the standard PHP version of the $_POST request occurs.
My code is the following:
$("#login").submit(function(event) {
event.preventDefault();
$("#loadingGif").show();
$("#login .formattedList").hide();
$.post("ajax/login", {
leftemail: $("#inp_leftemail").val(),
leftpw: $("#inp_leftpw").val(),
lefttoken: $("#inp_lefttoken").val(),
remember: $("#inp_remember").is(":checked") ? "1" : false
}, function(data) {
$("#loadingGif").hide();
$("#login .formattedList").show();
if (data.success) location.reload();
else $("#loginError").show().addClass("rounded pinkish badBorder error").html(data.msg);
}, "json");
});
Could anyone please offer some insight on what might be causing this issue?
@Steve: The code I used to include Google’s JQuery is
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>. Tried with all //, http:// and https:// beginnings.
Have you tried comparing the two as source? Put each through a JS formatter, then run a diff — seems like there must be differences at the code level. Find those and you have a clue to pursue.