Created
October 14, 2010 21:26
-
-
Save razass/627090 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
* Retrieves the value and text from the selected option in a select | |
* | |
* @method getSelectValues | |
* @public | |
* @since 1.0.0 | |
* @returns [object] | |
*/ | |
getSelectValues : function(inp) { | |
var value, txt; | |
value = inp.get('value'); | |
inp.get('options').each(function(opt) { | |
if(opt.get('value') == value) { | |
txt = opt.get('text'); | |
} | |
}) | |
return {id: value, txt: txt}; | |
}, |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment