I have a lot of radio element which have different names and also values. And when I click the radio, it will send to server with AJAX method.
AJAX METHOD :
$("input[type=radio]").click(function() {
$.ajax({
url: "http://localhost/myproject/ajax_url",
type: "POST",
data: $("#my-form").serialize(),
dataType: JSON,
success: function(){}
});
});
Previously I was used jQuery version 2.2.4 and it works fine, but when I try to change it with jQuery version 3.1.1 it showing an error :
Uncaught TypeError: (o.dataType || "*").toLowerCase is not a function
I'm sure that what I type on server is not wrong (because I never changing my server code), the error just showing when I try to upgrade my jQuery version. Your solution might help me a lot :)