seoras Posted October 11, 2017 Share Posted October 11, 2017 Maybe I’m just too stupid to work this out but it seem to me that the bootstrap dropdown list examples are missing out the obvious – that is, actually showing how to get the selection, which is surely the purpose of any dropdown list. For example, see this: https://www.w3schools.com/bootstrap/bootstrap_ref_js_dropdown.asp (dropdown events) It shows how to ascertain that the list title or header has been clicked on but not the actual selected item from the list – which is surely the purpose of the list, yet this is not shown as if it had no relevance. What am I missing here? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 11, 2017 Share Posted October 11, 2017 The contents of the dropdown menu are just regular HTML elements, so you do it the same way you do anything else. If you just want them to go to another page, then you can use a regular anchor element with the href set to wherever you want them to go. Or, you can attach click handlers to specific menu items to run some code when that item is clicked. It's fairly flexible in terms of the structure of the list, and you can attach the same kind of event handlers to the elements in the list that you can attach to anything else. Link to comment Share on other sites More sharing options...
seoras Posted October 11, 2017 Author Share Posted October 11, 2017 Well, it seems the first few words of my post are the most relevant becuase nothing is working for me with these examples. Visually appealing but doing nothing. In the 'school', an example would have been nice for the clearly terminally stupid such as myself. Link to comment Share on other sites More sharing options...
justsomeguy Posted October 11, 2017 Share Posted October 11, 2017 What exactly do you want to happen? Those examples are mostly used for navigational menu dropdowns, not as replacements for a field in a form. Is that what you're trying to do? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now