Skip to content

Instantly share code, notes, and snippets.

@nickpeirson
Last active August 29, 2015 14:06
Show Gist options
  • Save nickpeirson/8f32b778b0e1083b23d0 to your computer and use it in GitHub Desktop.
Save nickpeirson/8f32b778b0e1083b23d0 to your computer and use it in GitHub Desktop.
Hide JIRA agile board columns on header click
//hide column
var colWidths = {};
var headDims = {};
$('#ghx-column-headers li').toggle(
function() {
heading = $(this);
var columnId = heading.data('id');
headDims[columnId] = {
'width': heading.width(),
'height': heading.height()
};
heading.height('10px');
heading.width('10px');
heading.children('.ghx-qty').each(function () {
$(this).hide();
});
$('li[data-column-id="' + columnId + '"]').each(function() {
var column = $( this );
colWidths[columnId] = column.width();
column.width('10px');
});
},
function() {
heading = $(this);
var columnId = heading.data('id');
heading.width(headDims[columnId]['width']);
heading.height(headDims[columnId]['height']);
heading.children('.ghx-qty').each(function () {
$(this).show();
});
$('li[data-column-id="' + columnId + '"]').each(function() {
var column = $( this );
column.width(colWidths[columnId]);
});
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment