Skip to content

Instantly share code, notes, and snippets.

@fleimisch
Created January 9, 2019 18:16
Show Gist options
  • Save fleimisch/5a79e1a19da7940a15498221a87a44e5 to your computer and use it in GitHub Desktop.
Save fleimisch/5a79e1a19da7940a15498221a87a44e5 to your computer and use it in GitHub Desktop.
onclick="toggleActive(this, '0', true, false)" on any element a = this b = select parent '0' takes this element '-1' selects first parent, '-2' selects second parent, etc. c = true|false remove/hide this element when clicked outside (great for toolt
onclick="toggleActive(this, '0', true, false)" on any element
a = this
b = select parent '0' takes this element '-1' selects first parent, '-2' selects second parent, etc.
c = true|false remove/hide this element when clicked outside (great for tooltips, popups, etc)
d = run custom function after opening, example: myfunction()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment