update javascript live function to on