a technical notebook
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

37 lines
838 B

<script>
$(document).ready(function () {
// ☜ ☝ ☞ ☟ ☆ ✠ ✡ ✢ ✣ ✤ ✥ ✦ ✧ ✩ ✪
var closed_sigil = 'show';
var open_sigil = 'hide';
var togglesigil = function (elem) {
var sigil = $(elem).html();
if (sigil === closed_sigil) {
$(elem).html(open_sigil);
} else {
$(elem).html(closed_sigil);
}
};
$(".details").each(function () {
var $this = $(this);
var $button = $('<button class=clicker-button>' + open_sigil + '</button>');
var $details_full = $(this).find('.full');
$button.click(function (e) {
e.preventDefault();
$details_full.toggle({
duration: 550
});
togglesigil(this);
});
$(this).find('.clicker').append($button);
$button.show();
});
// $('.details .full').hide();
});
</script>
</body>
</html>