Created
October 19, 2016 10:41
-
-
Save jospoortvliet/1caaf56452f417ad9c2b937125440386 to your computer and use it in GitHub Desktop.
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
<script> | |
// open the collapsible item in the FAQ from the URL | |
$(document).ready(function(){ | |
if(window.location.hash != "") { | |
$('a[href="' + window.location.hash + '"]').click(); | |
} | |
}); | |
// Open the collapsible item in the FAQ when clicked on a href | |
jQuery( 'li.faqinfo a' ) | |
.click(function() { | |
do_the_click( this.href ); | |
return false; | |
}); | |
function do_the_click( url ) | |
{ | |
alert( url ); | |
var hash = url.substring(url.indexOf('#')+1); | |
alert( hash ); | |
$('a[href="#' + hash + '"]').click(); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment