[imp] Remove jQuery dependency from core.js. Closes #5257
[fix] Makes sure that jQuery is called for sidebar. Part of #5257