I am using ipython Jupyter notebook. Let\'s say I defined a function that occupies a lot of space on my screen. Is there a way to collapse the cell?
I want the func
Create custom.js file inside ~/.jupyter/custom/ with following contents:
$("").appendTo("head");
$('.prompt.input_prompt').on('click', function(event) {
console.log("CLICKED", arguments)
var c = $(event.target.closest('.cell.code_cell'))
if(c.hasClass('collapse')) {
c.removeClass('collapse');
} else {
c.addClass('collapse');
}
});
After saving, restart the server and refresh the notebook. You can collapse any cell by clicking on the input label (In[]).