Jump to content

How to open accordion section from an external link?


Recommended Posts

  • 2 weeks later...

When the page loads your ready function will run, this should open the accordion section the URI's hash refers to:

jQuery(document).ready(function() {
    // get the #section from the URL
    var hash = window.location.hash; 
    // open accordion
    // set title to active 
    /* ... the rest of your code here */

you might get a slight performance boost if you don't get the jQuery object twice, you can chain these like this:



Edited by ishan_shah
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...