Changing CSS with Jquery

0

In my select I have the list with the options, when selecting an option the content alternates because it is tied to the selects.

When I put data-native-menu="false" select does not allow changing table contents and selecting another option does not change the screen.

<select id="cities" style="padding: 5px; overflow:hidden; border-radius: 5px; height: 100%;" class="empty" name="cities" data-native-menu="false" onclick="selected(this.value)" >
   <option value="Selecionar">Selecionar</option>
</select>

JS

var select = document.getElementById('cities');

    function selected(value){

    var dadosLoja = document.getElementsByClassName('dadosLoja');
        if(value != "Selecionar"){
            dadosLoja[0].style.display = 'block';
        }else{
            dadosLoja[0].style.display = 'none';
        }
    }

I'm using the

<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> 
    
asked by anonymous 19.05.2016 / 19:40

1 answer

2

When using data-native-menu="false" I had to change onclick to onchange , that worked!

    
19.05.2016 / 21:40