Toolbar is visible but not working

Permalink
My toolbar is not working which I have determined is because of the following JavaScript function:

jQuery('#toc .toc_item').each(function() {
      "use strict";
      var id = jQuery(this).find('a').attr('href');
      var pos = id.indexOf('#menu');
      if (pos < 0 || id.length == 1) return;
      var loc = window.location.href;
      var pos2 = loc.indexOf('#menu');
      if (pos2 > 0) loc = loc.substring(0, pos2);
      var now = pos==0;
      if (!now) now = loc == href.substring(0, pos);
      if (!now) return;
      var off = jQuery(id).offset().top;
      var id_next  = jQuery(this).next().find('a').attr('href');
      var off_next = id_next ? jQuery(id_next).offset().top : 1000000;
      if (off < scroll_offset + jQuery(window).height()*0.8 && scroll_offset + OLDSTORY_STORAGE['top_panel_height'] < off_next)


Does anyone know a way around this?

 
stewblack23 replied on at Permalink Reply
stewblack23
Hey willharries

Would love to help you but I need a little more detail. Do you have a live link to your site so we can see the issue.
willharries replied on at Permalink Reply
I'm hosting it as an extension of my developing site here:http://wjhdevelopment.uk/sloop-inn/index.php...
stewblack23 replied on at Permalink Reply
stewblack23
So when you are login in to C5. The C5 toolbar panel at the top of the site does not work at all when you click on any of the buttons?
mnakalay replied on at Permalink Reply
mnakalay
You have so many javascript errors on that website you might want to look at that first.

The code you show in your post has nothing that would interfere with the toolbar in my opinion. If I'm not mistaken, all it does is, when the page loads, check if some kind of menu defined by id #toc was responsible for loading the page and if yes scroll to a particular item on the page. I don't see that menu anywhere on your page so I wonder if it does anything at all.
willharries replied on at Permalink Reply
I only have javascript errors when I use concrete5. Luckily I have found a solution called wordpress which isn't in permanent beta testing like concrete5 is
mnakalay replied on at Permalink Reply
mnakalay
Sooo... you came here asking for help - which we're trying to provide - only to tell us we suck? Lovely...

Wish you all the best with Worpdress
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
It probably hasn't helped much by wrapping the entire site in a div!
<div class="ccm-page page-template-full">
<!DOCTYPE html>
<html lang="en-US" class="scheme_original">
......