2016-08-19 2 views
0

Ich habe diesen NUMBERPICKER. Aber ich will nicht, dass die Zahlen in der Box im section_room angezeigt werden, bis sie ausgewählt sind. Bis dahin möchte ich ein backgroudImage (Platzhalter) haben.Custom NumberPicker - Optimierung

<div class="section_room"> 
    <select id="persons" type="text" placeholder="" onchange="hideIcon(this);"> 
    <option value="null">1</option> 
    <option value="null">2</option>   
    <option value="null">3</option> 
    <option value="null">4</option> 
    </select> 
</div> 

    <script> 
     function hideIcon(self) { 
     self.style.backgroundImage = 'none'; 
     } 
    </script> 
#persons { 
    background-image: url(../images/icn_person1_dark.png); 
    background-size: 40% 80%; 
    background-repeat: no-repeat; 
    background-position: center; 
} 
select { 
    float:right; 
    width: 20%; 
    height: 44px; 
    color: #858585; 
    font-size: 0.8725em; 
    outline: none; 
    font-family: 'Open Sans', sans-serif; 
    background: #ffffff; 
    border-color:darkgrey; 
    border-style: solid; 
    border-radius: 2px; 
    outline: none; 
    -webkit-appearance: none; 
    -moz-appearance: none; 
    text-indent: 1px; 
} 
select option { 
    -webkit-transition: all 0.3s ease-in-out; 
    -moz-transition: all 0.3s ease-in-out; 
    -o-transition: all 0.3s ease-in-out; 
    transition: all 0.3s ease-in-out; 
} 
+0

Welches Problem haben Sie, speziell? Ihr Skript sollte auch nicht innerhalb Ihres '