fixing a JS error when creating a publication with kmax since upgrade of JQuery