JQuery slideToggle question

As I’ve been progressing down the road from JQuery grasshopper to Ninja, I tried the slideToggle method on a table row and noticed that, after it toggled back into view after hiding the row, it added:

style="display: block"

to the table row:

<tr class="gallery" style="display: block">

This actually breaks the intended display of the table. Is there a way to remove that or at least set it to a ‘display’ value that won’t break the table?

Ah! Excellent. Thanks! :tup:

That’s a known slideToggle bug.

The work-around is to use the callback to set the display type back to a table-row.

$('#tableRowId').slideToggle(function () {
    $(this).css('display', 'table-row');