IE Select Element Fix, jQuery
$(function() {
var expand = function()
{
var myWidth = $(this).css("width").replace('px', '');
$(this).parent().css('position', 'relative');
$(this)
.data("origWidth", $(this).css("width"))
.css("width", "auto")
.css('position', 'absolute');
if( $(this).width() < myWidth )
{
$(this).css('width', $(this).data("origWidth"))
}
};
var contract = function()
{
if (!this.noHide)
{
$(this).parent().css('position', 'static');
$(this)
.css("width", $(this).data("origWidth"))
.css('position', 'static');
}
};
var focus = function(){ this.noHide = true };
var blur = function(){ this.noHide = false; contract.call(this) };
$("select").hover(expand, contract).focus(focus).click(focus).blur(blur).change(blur);
});
Based on http://stackoverflow.com/questions/206997/jquery-javascript-ie-hover-doesnt-cover-select-box-options