/ Published in: jQuery

This snippet gets the value of the selected dropdown
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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();
Comments
