add width restriction on js