IE8 下 select option 内容过长 , 展开时信息显示不全解决办法

 1 IE8 下 select option 内容过长 , 展开时信息显示不全 , 简单折衷的方式就是给 option 加上 title 属性 , 
 2 但是又不想一个个的修改,怎么办呢,代码如下 : 
 3 
 4 //select option bind title
 5 $(document).delegate('select', 'mouseover', function()
 6 {
 7     var $this = $(this);
 8     if($this.data('data-bind-title'))
 9     {
10         return;
11     }
12  
13     $this.data('data-bind-title', true).find('option').each(function()
14     {
15         var $option = $(this);
16         var _text = $.trim($option.text());
17         if(_text.length > 0 && !$option.attr('title'))
18         {
19             $option.attr('title', _text);
20         }
21     });
22 });
原文地址:https://www.cnblogs.com/Orange-C/p/4042518.html