Skip to content

Instantly share code, notes, and snippets.

@le-dawg
Created February 13, 2018 18:07
Show Gist options
  • Save le-dawg/7adce5a18ae31dcd057da4f5c7c750cc to your computer and use it in GitHub Desktop.
Save le-dawg/7adce5a18ae31dcd057da4f5c7c750cc to your computer and use it in GitHub Desktop.
[Wordpress, X Theme, Cornerstone] Close Accordion Element on load
//This snippet is a very short jQuery function that is executed when the javascript is exectued on load.
// Troubleshooting:
// You might want to add a specific class to the accordion element itself and then append that to the first div: ('div#accordionID > ...
jQuery(function(){
jQuery('div > div.x-accordion-heading > a.x-accordion-toggle').click();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment