I was trying to get a text from the DropdownList like that :
$('#test option:selected').text()
But not working.
<div class="col-md-10">
@Html.DropDownList("Percentage", new SelectList(items, new { @class = "form-control", @id = "test" }))
</div>
And de Js file:
$(document).ready(function () {
$("#test").change(function () {
var result = $("#test option:selected").text();
alert(result)
});
but still, nothing.