remove repetitive js in partial