开发者

jQueryUI Tooltip: Issues with IE select boxes

开发者 https://www.devze.com 2023-02-05 13:35 出处:网络
For the life of me I cannot figure this out. The jQueryUI tooltip feature (relatively new) works perfectly on absolutely everything, in every browser. Except select boxes in IE! It seems for some reas

For the life of me I cannot figure this out. The jQueryUI tooltip feature (relatively new) works perfectly on absolutely everything, in every browser. Except select boxes in IE! It seems for some reasons that IE is reading every "option"开发者_如何学运维 element as a very relevant part of the "select". Thus, while the tooltip works perfect even in IE when you merely hover over a select box, it breaks as soon as you click it.

I am using jQuery version 1.5 beta1 (though I have tested this in every version from 1.4 onward), and jQueryUI version 1.8.8.

Edit: An example of this may be seen at this location.


Here is a link to the bug: http://bugs.jqueryui.com/ticket/8798

The solution they suggest is just wrap the text in another element, for example a div, that will trigger the tooltip.

<div class="tooltip" title="Some text">
    <select>
       <option>...</option>
    </select>
</div>


You can always detect the user agent header and display "Sorry, this site requires using a browser." when someone comes in with IE. :)


use this code for tooltip work on ie browser

$( "select" ).each(function(){$(this).wrap( "<span title='"+ $(this).attr("title")+"'></span>" );$(this).removeAttr("title");});
0

精彩评论

暂无评论...
验证码 换一张
取 消