having issue's in asp.net using my checkboxes to unhide my dropdowns

lexutzu

New Member
ok so essentially what I am trying to do is when you click on my check box for a class it unhides a drop down so that you can select a name out of it. here is the html and the j query code I am using\[code\]`<tbody> @foreach (var a in DropDownList.GetCourses) { <tr> <td> <input id="coursecheck" type="checkbox" name="courseId" value="http://stackoverflow.com/questions/15713827/@a.Id"/></td> <td>@a.CourseName</td> <td class="hidden" id="teachlist" data-fts-conectionid="@a.Id">@Html.DropDownList("instructorId", DropDownList.GetInstructors)</td> </tr> }<tr> </tr> </tbody>\[/code\]`and here is the jquery that I've been trying to use for it i have been looking around the site and searching and trying different things but I just can't get it to work.\[code\]`//$('main').on('change', '#coursecheck', function () {// var $checkbox = $(this);// var $checkboxid = $checkbox.attr("value");// var $dropdowndata = http://stackoverflow.com/questions/15713827/$('#teachlist').attr('data-fts-connectionid');// var $connect = function() {// if ($checkboxid == $dropdowndata && $('#teachlist').hasClass("hidden")) {// $('#teachlist').removeClass("hidden");// } else if ($checkboxid == $dropdowndata && !$('#teachlist').hasClass("hidden"))// $('#teachlist').addClass("hidden");// };//});//$('#main').on('click', '#coursepopover', function() {// if ($('#coursecheck').is('checked')) {// $('#teachlist').removeClass("hidden");// } else {// $('#teachlist').addClass("hidden");// }//});`\[/code\]I know it is something simple that I am just missing but i just can't see it maybe another pair of eye's can though thank you in advance for any help if I figure it out I will be sure to post the code fix for it.
 
Back
Top