Created
October 26, 2016 05:52
-
-
Save captprice26/1fac564bd02be6a94022d30495eb7691 to your computer and use it in GitHub Desktop.
For Divi theme accordion open based on URL anchor
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
//Divi Theme Open Accordion based on Anchor Tag | |
jQuery(function($){ | |
$(document).ready(function() { | |
var hashValue = location.hash; | |
hashValue = hashValue.replace(/^#/, ''); //Get the Hash value from URL | |
var newText = "#" + hashValue + " h5.et_pb_toggle_title"; //Concatenate the hash value to locate the toggle location | |
$(newText).click(); //Call the variable with hash and class in it | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For Wordpress - Divi Theme only