unable to select an item from select box using select name.
I am using following code to select an item from select box dynamically.But its not working. Can anybody help me on this.I know we can use id here, but i need with name.
$("select[name='temp_name'] option:eq('bb')").attr("
selected","selected");
select box is like this.
<select name='temp_name'>
<option value='bb'>bb</option>
<option value='cc'>cc</option>
</select>