Skip to content

Instantly share code, notes, and snippets.

@vdite
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vdite/9922309 to your computer and use it in GitHub Desktop.
Save vdite/9922309 to your computer and use it in GitHub Desktop.
Remove disabled select options on iOS devices from DOM to handle mobile safari issues with disabled select options
if(navigator.userAgent.match(/(iPad|iPhone|iPod touch)/i)
&& !navigator.userAgent.match(/(iPad|iPhone|iPod touch);.*CPU.*OS 7_\d/i)){
$('select.your_special_class option[disabled]').remove();
}
@vdite
Copy link
Author

vdite commented Apr 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment