Using JQuery To Select and Option From a Drop Down Menu?
How can I do this with jquery. I tried this-
$("#months option").each(function()
{
val = $(this).attr("value");
if(val == month)
{
$(this).attr("SELECTED", "");
}
});
And it successfully added "selected" to the correct item. But it wasn't actually selected. How can I do this correctly?