update jquery to append grouping to the text element