It is actually a bug in IE9.
The issue shows up, most often, when using AJAX when there is partial page rendering. It seems according to forum remarks to be focused on white space between table tag elements like line breaks, spaces, or carriage returns. So if you use HTML tidy, you will screw up your output. Nice one Microsoft!
Fortunately, there are "fixes" out there to help you get along. Here is the fix which I slightly modified from an answer on stackoverflow. A shout out goes to Blago for his recursive function listed below.
1 2 3 4 5 6 7 8 9 10 11 12 | jQuery.fn.htmlClean = function () { this .contents().filter( function () { if ( this .nodeType != 3) { $( this ).htmlClean(); return false ; } else { return !/\S/.test( this .nodeValue); } }).remove(); return this ; } |
You can implement it this way.
1 | $( '#myTable' ).htmlClean(); |
0 comments :
Post a Comment