Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Anchors won't hold…

Home / Forums / Virtue Theme / Anchors won't hold…

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
April 14, 2016 at 8:55 am

Hi Ben, Hannah,

I’m wrapping up the details for our new website.

I found:

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

  • The forum ‘Virtue Theme’ is closed to new topics and replies.