[NUI in HTML] Option of select not visible but clickable


#1

Hello,

I have a little problem with my manager in NUI (HTML/CSS). I use a select form but in GTA, my options of this select isn’t visible. I can click on different option if I click just under my select or choose it with up and down.

I try to change the css of theses options but nothing.

Anyone find how to fix it ?

<select class="amelioration" id='offtaux'>
        <option value = 0>10%</option>
        <option value = 1>$6 000 + 7%</option>
        <option value = 2>$10 000 + 5%</option>
        <option value = 3>$16 000 + 2%</option>
        <option value = 4>$20 000</option>
 </select>

Screenshot_10


#2

So your issue is when you click the select, your options to choose from don’t appear below it, correct?


#3

Thats how it works, the only way to actually go through the options is with arrow keys :S


#4

Either that or use a jQuery plugin that generates it’s own dropdowns/select menus.


#5

Yes, it’s correct.

It’s very strange, because NUI is juste HMTL code. I don’t undersand why it’s not possible :frowning:

I will try with jQuery but it’s a little bit to much for just select …


#6

There’s some lightweight jQuery plugins that can do it that won’t affect load times if you host it on your server. Obviously it’s not a proper fix, but it’s one that could be achieved without much effort.


#7

Somewhere I heard that CEF works bad with Dropdowns


#8

Yes, drop downs don’t work too well. I also wish there was an easier way to do dragging as well but unfortunately I haven’t seen one yet.


#9

Anyway, JavaScript works very well so you can try to make your own dropdowns.


#10

It’s work with JQuery selectmenu() function. Thanks.

Screenshot_12


NUI (cef)
#11

Oh, nice. Time to update my NUI stuff :smile: