Skip to content

Instantly share code, notes, and snippets.

View willpower232's full-sized avatar
🤓
Hey there! I am using GitHub.

Will Power willpower232

🤓
Hey there! I am using GitHub.
View GitHub Profile
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 27, 2024 22:20
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
let element = document.querySelector('#auto-complete');
let uri = 'https://example.org/search';
let choice = new Choices(element, {
removeItemButton: false,
itemSelectText: '',
shouldSort: false,
});
let timer = null;
choice.passedElement.addEventListener('search', function (event) {
@scmx
scmx / using-details-summary-github.md
Last active May 26, 2024 16:59
Using <details> <summary> expandable content on GitHub with Markdown #details #summary #markdown #gfm #html

How to use <details> <summary> expandable content on GitHub with Markdown

Firstly, what is <details> <summary>?

The HTML Details Element (<details>) creates a disclosure widget in which information is visible only when the widget is toggled into an "open" state. A summary or label can be provided using the <summary> element. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details.

Example