Select Dropdown Cutoff in IE 7 | select box issue with IE
Use this jquery code
// Safely use $
(function($) {
$.fn._ie_select=function() {
return $(this).each(function() {
var a = $(this),
p = a.parent();
p.css(‘position’,'relative’);
var o = a.position(),
h = a.outerHeight(),
l = o.left,
t = o.top;
var c = a.clone(true);
$.data(c,’element’,a);
c.css({
zIndex : 100,
height : h,
top : t,
left : l,
position : ‘absolute’,
width : ‘auto’,
opacity : 0
}).attr({
id : this.id + ‘-clone’,
name : this.name + ‘-clone’
}).change(function() {
$.data(c,’element’)
.val($(this).val())
.trigger(‘change’)
});
a.before(c).click(function() {
c.trigger(‘click’);
});
}); // END RETURN
}; // END PLUGIN
// Usage
if ($.browser.msie) {
$(‘select’)._ie_select();
}
})(jQuery); // END SAFETY
Thanks to http://css-tricks.com/snippets/jquery/fix-select-dropdown-cutoff-in-ie-7/
Latest posts
- bootstrap popover | bootstrap popover hide on click | bootstrap popover hide on document.click
- Avoid console errors in browsers that lack a console | HTML5 boilerplate
- getting started with Sublime editor | how to install zen coding | zen coding for sublime editor
- getting started with backbone | Models in Backbone
- How to delete a model in backbone






