Question: I have a dropdown list,

```
<select id="bi_tool_y_axis" name="bi_tool[y_axis]">
   <option value="0">Vote Count</option>
   <option selected="selected" value="1">Choices of Poll</option>
   <option value="2">Location</option>
</select>

```

and a jquery function to change option text of value 2 in the above dropdown list

```
function change_text_of_value_2(new_text){
    // I want  to change text "Location" with new_text in the dropdown list
}

```

How can I do this? Please help..

Answer: 
why not simply

```
$("#bi_tool_y_axis option[value='2']").text("anything else");

```

And this you call into function (your function and put the parameter into `text` function);

Or

```
function change_text(optionValue, new_text){
   $("#bi_tool_y_axis option[value='"+optionValue+"']").text(new_text);
}

```
Try this

```
$(function() {

    $('#bi_tool_y_axis').on('change', function() {

        if ($(this).val() == '2') {
            change_text_of_value_2($(this), "New_Text_Added")
        }
    });
});

function change_text_of_value_2($elem, new_text) {
    $elem.find("option[value='2']").text(new_text);
}​

```

Check [FIDDLE](http://jsfiddle.net/sushanth009/LWmWu/)