Skip to content

Instantly share code, notes, and snippets.

@matherton
Created January 9, 2015 17:09
Show Gist options
  • Save matherton/9438e579d0cf547eca40 to your computer and use it in GitHub Desktop.
Save matherton/9438e579d0cf547eca40 to your computer and use it in GitHub Desktop.
Bootstrap making first instance of select class form-control unselectable in IE8 fix
$(function () {
if (navigator.userAgent.indexOf('MSIE 8.0') > 0 ) {
var $formControl = $('select.form-control:first');
if ($formControl.length > 0) {
$formControl.before('<select class="form-control" style="display:none"></select>');
}
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment