Skip to main content

Bug Tracker

Side navigation

Ticket #4753: jquery-table-toggle-bug.html

File jquery-table-toggle-bug.html, 1.5 KB (added by darkoz, July 13, 2009 01:41AM UTC)

buug example and workaround

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
        <title>jQuery IE8 toggle bug</title>
        <script src="" type="text/javascript"></script>
            $(function() {
		var column = $("table td:nth-child(2)");
		var div = $("div");
		div.append("<p>At start -> display:" + column.css("display") + "</p>");
		div.append("<p>After 1 toggle -> display: " + column.css("display") + "</p>");
		div.append("<p style=\"color:red;\">After 2 toggles -> display:" + column.css("display") + " <- This should be table-cell or block</p>");

		//workaround - dont use toggle;
		div.append("<p>After -> display:" + column.css("display") + "</p>");
            table { border-collapse:collapse; margin:20px; }
            td { border:1px solid #ccc; padding:0 5px; }
        <p>This is an IE8 issue only. Toggle works only when hiding table cells, but not when it needs to show it.</p>

Download in other formats:

Original Format