April 14, 2016 at 8:55 am
Hi Ben, Hannah,
I’m wrapping up the details for our new website.
I found: *Login to see link
This works.
The problem I have is the offset. It seems oblivious to the code that’s supposed to fix that. See this forum thread.
In “Footer Column 1” I placed WordPress’ “Arbitrary Text widget” with the following code:
<script type="text/javascript">jQuery(document).ready(function ($) {$('#nav-main').localScroll({offset: 80});});</script>
<script type="text/javascript">
jQuery(document).ready(function ($) {
if ($('#accordionname1').length) {
if (location.hash){
if($(location.hash).hasClass('in') ) {
} else {
$('#accordionname1 .in').parent('.panel-default').find('.accordion-toggle').addClass('collapsed');
$('#accordionname1 .in').collapse('hide');
$(location.hash).collapse('show');
$(location.hash).parent('.panel-default').find('.accordion-toggle').removeClass('collapsed');
}
}
}
});
</script>
The second script works, the first one doesn’t.
Can you tell me what I am doing wrong?
Thanks!
Robert