2
I’ve searched several sites, but I did not find one that was what I wanted, the ones I saw expand the select using the size and that’s not what I want, I want as if it was a user click on the select, it does not push anything down, or take up more space, just appears on the other options, overriding what is underneath.
Here, one of my tests, but this is not how I want.
$("#contPrazo").hover(function(){
$("#contPrazo").attr("size","4");
});
$("#contPrazo").focus(function(){
$("#contPrazo").attr("size","4");
});
$("#contPrazo").mouseleave(function(){
$("#contPrazo").attr("size","1");
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<select id="contPrazo" name="contPrazo">
<option value="30">30 MESES</option>
<option value="12">12 MESES</option>
<option value="24">24 MESES</option>
<option value="36">36 MESES</option>
<option value="48">48 MESES</option>
</select>
From what I researched here, it is not possible to open it no. Maybe you can create a dropdown to do this, rather than a select.
– bio
You can create a component, using UL/LI but with the appearance of a Select, ai yes with CSS or JS is easier to manipulate. If this can be an option for you... Bootstrap itself does not have a select, its select is built with other HTML elements
– hugocsl
use bootstrap, but I don’t know this "select" of them, in my Forms always use
<select class="form-control" id="" name="">
– user139461