Last active
August 29, 2015 14:22
-
-
Save aivuk/11c7fa903a6630d9c203 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from IPython.display import HTML, Javascript, display | |
js = """ | |
var botao = $('<button class="toogle-button" id="botao">Mostrar/ocultar célula</button>'); | |
botao.click(function(event) { | |
var cell = $(".selected", document); | |
var input_area = $(".input_area", cell); | |
$("div[is_hidden='true']").toggle().attr('is_hidden', 'false'); | |
var attr = input_area.attr('is_hidden'); | |
console.log(attr); | |
if (!attr) { | |
input_area.attr('is_hidden', 'true'); | |
input_area.hide(); | |
} | |
}); | |
$('#notebook-container').append(botao); | |
""" | |
js = Javascript(js) | |
display(js) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment