Hi I'm working on a MVC application that has a drop down menu in it, and the items in this drop down are fetched from the DB via a foreach.
foreach (Category item in Model.CategoriesV){
<input type="submit" class="dropdown-item" id="Show"
value="@item.CategoriesName" name="CategName" />
}
I get 3 results from this for each (Mobiles-Consoles-Tablets), I have another div that contains an image gallery. I used this code to hide this gallery once I click on an item in the drop down menu. Here's the image galley(I put it in a Partial View)
<div id="ImageGalleryDiv">
@Html.Partial("_ImageGallery", Model)
</div>
And here's the script that I used to hide the gallery once I click on drop down items list.
<script>
$(document).ready(function () {
$('#Show').click(function () {
$('#ImageGalleryDiv').hide("100");
});
});
Everything is working fine when I click on Mobiles (the first item in the drop down),the others items aren't working. Any help would be appreciated.