Skip to content

Instantly share code, notes, and snippets.

@kbariotis
Created March 4, 2013 10:42
Show Gist options
  • Save kbariotis/5081431 to your computer and use it in GitHub Desktop.
Save kbariotis/5081431 to your computer and use it in GitHub Desktop.
Untitled
details {
decorator: url(#details-closed);
}
details[open] {
decorator: url(#details-open);
}
<decorator id="details-closed">
<script>
this.listen({
selector: "#<style>
summary", type: "click",
handler: function (event) {
event.currentTarget.open = true;
}
});
</script>
<template>
<a id="summary">
&gt; <content select="summary:first-of-type"></content>
</a>
</template>
</decorator>
<decorator id="details-open">
<script>
this.listen({
selector: "#summary", type: "click",
handler: function (event) {
event.currentTarget.open = false;
}
});
</script>
<template>
<a id="summary">
V <content select="summary:first-of-type"></content>
</a>
<content></content>
</template>
</decorator>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment