Created
February 13, 2018 18:07
-
-
Save le-dawg/7adce5a18ae31dcd057da4f5c7c750cc to your computer and use it in GitHub Desktop.
[Wordpress, X Theme, Cornerstone] Close Accordion Element on load
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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