Warning: file_get_contents(cmnModules/cmnJs/el_dropdown.js): failed to open stream: No such file or directory in /home/liquid8/public_html/00_DevSites/drempd/site/pages/blog/post.php on line 78
- You can optionally set a data attribute so the dropdown will automatically match the width and margin of whatever element triggers it, like an input box.
- You don't have to insert any css to make things show or hide (although the background of the dropdown is transparent by default, so you may want to give your dropdown div a background color at least).
- While this can just be used as a dropdown for whatever, I used it as a way to create a select box, where you can use checkboxes to select items (or multiple items). The script looks for checkboxes in the dropdown div. If it finds that there are checkboxes and the triggering element is an input box, it will automatically update the input box with the list of values as the user checks items.
- As mentioned, this isn't specifically set up to be a dropdown selector, so it won't autobuild the html for the checkboxes in the dropdown. I think it's more flexible this way, and that way you can name the checkboxes and get the respective data however you want.
Fixed Position Div Isn't Staying Fixed When Scrolling on Android
My nice fixed position toolbar wasn't sticking as it should as I scrolled through on my mobile browser window...
Simple Sticky Element
The user scrolls down the page and once the scrolling reaches the top of an element of my choosing, that element sticks to the top of the window, so it's always visible from that point on...
Chrome displays a different height than what Chrome says the height should be.
I was changing the height of an element, but no matter where I specified the height, it wasn't displaying what I was putting in
The Built Environment