jQuery Slow in IE to do a mouseover on a TR
When the mouse hovers over the TR, we want to show a hidden DIV. We could bind this function to the TR with jQuery but this is just done at the server side:
<tr onmouseover="displayDIV('0123456789');" onmouseout="hideDIV('0123456789');" ...
function displayDIV(rowID) {
$('#options'+rowID).css('visibility','visible');
}
function hideDIV(rowID) {
$('#options'+rowID).css('visibility','hidden');
}
Thi开发者_如何学运维s is fast in Chrome, but very slow in IE. How can this be improved?
If you use
$('#options'+rowID).show()
and
$('#options'+rowID).hide()
rather than setting CSS properties directly, does the performance improve?
精彩评论