0👍
✅
This part:
window.onload = ...
… replaces all previous onload
event handlers attached to window
. Since you are already using jQuery there’s no need to this stuff manually, just:
jQuery(function($){
// Do stuff
});
… as usual.
Source:stackexchange.com