I have the below function,

```
function setDropdownValue(dropdownId,selectedValue){
            $('#'+dropdownId+' option').each(function(){
                 if ($(this).val().toLowerCase()==selectedValue.toLowerCase()){
                     //found the option i  was looking for, do what i want
                     $(this).val(selectedValue);
                 }
            });
        }

```

And i am passing `dropdownId=$('#dp1")` and `selectedValue='Bat'` and for some reason my each() function is not getting executed.. I am calling like this `setDropdownValue($("#dp1"),'Bat');`Am i missing something??