- }
- // Hide revealed columns.
- else {
- this.$revealedCells.hide();
- // Strip the 'display:none' declaration from the style attributes of
- // the table cells that .hide() added.
- this.$revealedCells.each(function (index, element) {
- var $cell = $(this);
- var properties = $cell.attr('style').split(';');
- var newProps = [];
- // The hide method adds display none to the element. The element
- // should be returned to the same state it was in before the columns
- // were revealed, so it is necessary to remove the display none value
- // from the style attribute.
- var match = /^display\s*\:\s*none$/;
- for (var i = 0; i < properties.length; i++) {
- var prop = properties[i];
- prop.trim();
- // Find the display:none property and remove it.
- var isDisplayNone = match.exec(prop);
- if (isDisplayNone) {
- continue;
+ } else {
+ this.$revealedCells.hide();
+
+ this.$revealedCells.each(function (index, element) {
+ var $cell = $(this);
+ var properties = $cell.attr('style').split(';');
+ var newProps = [];
+
+ var match = /^display\s*\:\s*none$/;
+ for (var i = 0; i < properties.length; i++) {
+ var prop = properties[i];
+ prop.trim();
+
+ var isDisplayNone = match.exec(prop);
+ if (isDisplayNone) {
+ continue;
+ }
+ newProps.push(prop);