rails/jquery-rails

url.indexOf is not a function in jQuery.fn.load = function( url, params, callback )

Seventhstar opened this issue · 1 comments

jquery3.self-e200ee796ef24add7054280d843a80de75392557bb4248241e870fac0914c0c1.js?body=1:10092 Uncaught TypeError: url.indexOf is not a function
at jQuery.fn.init.jQuery.fn.load (jquery3.self-e200ee796ef24add7054280d843a80de75392557bb4248241e870fac0914c0c1.js?body=1:10092)
at HTMLDocument. (common.self-3ccd50855eb87e1d709fcb22aecb5cf3431f583a079691479559a9777b3d3451.js?body=1:47)
at mightThrow (jquery3.self-e200ee796ef24add7054280d843a80de75392557bb4248241e870fac0914c0c1.js?body=1:3558)
at process (jquery3.self-e200ee796ef24add7054280d843a80de75392557bb4248241e870fac0914c0c1.js?body=1:3626)

Update all your code that calls load function like,

$(window).load(function() { ... });
To
$(window).on('load', function() { ... });

jquery.js:9612 Uncaught TypeError: url.indexOf is not a function
This error message comes from jQuery.fn.load function.

https://stackoverflow.com/questions/37738732/jquery-3-0-url-indexof-error