Pure CSS click to drop down
I guess I’ve never tried to do this before, but if like me you’ve been using JS to create click to drop down menus for years give this a try:
Here’s a simplified snippet of the code we used on the split “new publication” button.
/* your button style*/
transition: visibility 0.5s;
<div class="button" tabindex="-1">
Dropdown content here
It’s worth noting that if you’re using an element which can’t normally be focused on for your button (such as the DIV I used above) you’ll need to add the following attribute for it to work: