/*Please give a thumbs up if this was helpfull*/
$('#toggle1,#toggle2,#toggle3').click(function() {
toggleText(this.innerHTML);
});
function toggleText(text)
{
$(".text").each(function() {
$(this).val($(this).val().split( /circle|square/ ).join("") + " " + text); //remove existing circle or square and then add text
});
}