Deleted jQuery function, added alert in JS function