Return to Snippet

Revision: 55554
at February 11, 2012 03:05 by jjmu15

Initial Code
jQuery.fn.selectedLabel = function()
	return this.find(':selected').html();

Then you can access the text from a selected option within a select:
var text = $('select#month').selectedLabel();

Initial URL

Initial Description
This snippet gets the value of the selected dropdown

Initial Title
Get value of selected option in Drop Down

Initial Tags
dropdown, jquery

Initial Language