Created
July 4, 2012 00:18
-
-
Save ografael/3044317 to your computer and use it in GitHub Desktop.
fix_combo_ie.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var el; | |
$("select") | |
.each(function() { | |
el = $(this); | |
el.data("origWidth", el.outerWidth()) // IE 8 will take padding on selects | |
}) | |
.mouseenter(function(){ | |
$(this).css("width", "auto"); | |
}) | |
.bind("blur change", function(){ | |
el = $(this); | |
el.css("width", el.data("origWidth")); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment