Skip to content

Instantly share code, notes, and snippets.

@fbrnc
Created July 25, 2014 04:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fbrnc/f4e9fd908c8e01754b71 to your computer and use it in GitHub Desktop.
Save fbrnc/f4e9fd908c8e01754b71 to your computer and use it in GitHub Desktop.
Make Magento System Configuration tabs collapsable
// Quick'n'dirty
// TODO:
// - store status in a cookie
// - restore status from cookie
// - prevent tab that contains active tabs from being collapsed
// - change icon when collapsed
// - change mouse pointer
$$('#system_config_tabs dt.label').each(function(s) {
s.observe('click', function(label) {
s.siblings().each(function(a) { a.toggle(); })
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment