i have this code
<div id="aggregate" style="display:inline">
<%=Html.RadioButton("a", "1", true, new {id = "meRadio"})%><label>Me</label>
<%=Html.RadioButton("a", "2", false, new { id = "teamRadio" })%><label>Team: </label><% = Html.DropDownList("Teams", Model.Teams, new {@scope="Team", @id = "teamDropdown", @class = "filterDropdown" })%>
<%=Html.RadioButton("a", "4", false, new { id = "managerRadio" })%><label>Manager: </label><% = Html.DropDownList("Managers", Model.People, new { @scope = "Manager", @id = "managerDropdown", @class = "filterDropdown" })%>
<%=Html.RadioButton("a", "5", false, new { id = "locationRadio" })%><label>Location: </label><% = Html.DropDownList("Locations", Model.Locations, new { @scope = "Location", @id = "locationDropdown", @class = "filterDropdown" })%>
</div>
i currently have code like this:
$('#workstreamRadio').click(function () {
Enable("#workstreamDropdown");
});
$('#teamRadio').click(function () {
Enable("#teamDropdown");
});
I am sure there is a way using jquery to dynamically get the respective dropdown selector given a specific radio button clicked so i dont have to hard code each mapping.
what is the syntax for saying "get me the selector of the dropdown to the right of the radio button i clicked"