rails / jquery-rails

A gem to automate using jQuery with Rails
MIT License
948 stars 406 forks source link

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

Open Seventhstar opened 4 years ago

Seventhstar commented 4 years ago

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)

dr-nyt commented 1 year ago

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