I would like to show a div depending on the selection in the dropdown. I am filling the dropdown with 2 values from a sharePoint service They are Inside or Outside. When the user selects Inside I would like to show the div. I am however unable to select the selected value. How do I do this in jQuery?
<asp:DropDownList runat="server" id="urlOptions">
<asp:ListItem Value="" Text="Select Answer"></asp:ListItem>
<script type="text/javascript" >
$(function () {
$("button").on("click", function () {
if ($("#urlOptions").val() == "Inside") {
$("#div1").show();
}
else {
alert("something is wong");
}
return false;
});
});