update code for jquery higher version (e.g. live() to on())