Created
April 10, 2012 19:26
-
-
Save PilotBob/2353856 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function AutoCompleteGetIdValue(elem) { | |
var testValue = $(elem).val(); | |
var id; | |
$(elem).data().autocomplete.widget().children(".ui-menu-item").each(function () { | |
var item = $(this).data("item.autocomplete") | |
if (item.value == testValue) { | |
alert(item.id); | |
id = item.id; | |
} | |
}); | |
return id; | |
} | |
the alert displays the correct value but the id on the return line shows "undefined" in my debugger? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment