Reputation: 45
The dropdownlist is showing when it is clicked, and working fine. I would just like the dropdownlist shown when the page originally is loaded.
I have tried using the .click(), .mousedown(), and using the Jquery Animate library, with no luck. And, I know the Javascript needs to go in a .ready function, I'm not worried about that part. More just how to automatically show it.
When inspecting the element in Chrome Dev tools it is outside the flow of the body (not highlighted when body is selected) and I dont see any css changes that would show or hide the dropdown list.
The code in the view looks like this:
<div class="jump-practice" id="JumpToChoiceDropdown">
@Html.DropDownListFor(m => m.SelectedChoiceUrl, Model.ChoiceItems, "Make a Choice", new {@id="ShowThisList", datasource = "choice" })
<label></label>
</div>
Upvotes: 0
Views: 85
Reputation: 45
My error was outside of jquery and the element I had originally been working with. I needed to put the javascript I was using in the partial view with my dropdownlist and not in the page that was using that partial view.
Thanks.
Upvotes: 1