I just upgrade one of my project to the latest jQuery version and it stopped working. I was using jQuery v1.12.4 and it was working fine. This issue came after switching to 3.5.1.
On the console log, it says:
TypeError: a.error is not a function
And my affected code part:
var imageCell = $("#imageCell");
function tripDestination(t, e) {
var n = Math.floor(0x10000000000000000 * Math.random()).toString(36);
n = t + "my?x=" + n, imageCell.empty(), imageCell.html("<img id='myImage' style='display: none'>");
var a = $("#myImage");
a.error(e), a.attr("src", n)
}
Any help would be greatly appreciated.