I'm working with an HTML select tag
<select class="filter">
<option values="1">One</option>
<option values="2">Two</option>
<option values="3">Three</option>
</select>
My goal is to present the different options as a horizontal list of <a>
hyperlinks on larger screens (above 481px) and as a dropdown list for smaller screens (480px and below). When one of the hyperlinks is clicked, it should reflect the same option values as in the original select tag.
I've come across examples online where a list of <a>
elements was transformed into what appeared to be a dropdown list using jQuery. However, upon closer inspection, it seemed that these elements were simply stacked on top of each other and displayed as a dropdown when clicked.