$(".f-dropdown-menu a").each(function() { var text = $(this).text(); var newText = text.trim().split(' ')[0]; $(this).text(newText); }); $("#menu_settings_curr option").each(function() { var text = $(this).text(); var newText = text.trim().split(' ')[0]; $(this).text(newText); }); pixelpixel