fixing jQuery on() syntax