css - Hide 'option' element in iphone -
here html:
<select> <option style="display:none;">1</option> <option>2</option> <option>3</option> <option>4</option> </select> here result on chrome - desktop

and here result in iphone - safari

you disable or remove using jquery
demo http://jsfiddle.net/fa8xx/1728/
<select> <option class="targetthis">1</option> <option>2</option> <option>3</option> <option>4</option> </select> jquery
function isiphone(){ return ( (navigator.platform.indexof("iphone") != -1) || (navigator.platform.indexof("ipod") != -1) ); } if(isiphone()){ $(".targetthis").attr('disabled', true); }
Comments
Post a Comment