Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #329769

    derekyoungtomo
    Participant

    I have custom sidebar menus set up on different pages of my site. These menus use hash(#) urls to go to the corresponding div id. Normally this would work, but on the individual pages, clicking on the corresponding link in the sidebar menu doesn’t trigger a change to the correct div id. I have one-page navigation enabled for the main menu on X Settings.

    Examples:
    This page uses relative “#DIV_ID” urls in the custom menu link.
    http://wh1.tomohost.com/~threekey/about-us/

    This page uses absolute “http:/www.domain.com/#DIV_ID” urls in the menu.
    http://wh1.tomohost.com/~threekey/our-process/

    This page uses onClick events to trigger the hash link. It works fine, but clicking on the URL doesn’t provide the smooth scrolling I’d expect from one page navigation.
    http://wh1.tomohost.com/~threekey/about-us/the-team/

    Do you have any suggestions on how to fix this? I’ve tried lots of different scripts to force a hash change event, but nothing works. Since I can’t use onClick in the custom link of the menus, that is not an option. Thanks so much.

    #329797

    Christopher
    Moderator

    Hi there,

    The issue is that you add id to headlines, while you should wrap the whole related section in a <div> with that id.

    It should be like the example :

    
    <div id="site-selection">
    <h4 class="h-custom-headline h3"><span>Site Selection</span></h4>
    <div class="x-text"><p><span style="color:#e2231a">Three Keys Development</span> is committed to the principles of sound decision-making at the most fundamental of levels — specifically, the ground level. Our search begins with and is limited to stable, affluent communities marked by strong desirability, sustainable real estate market rates and appreciation, high demand, limited availability and appeal among individuals of a high net worth.</p>
    <p>We take a comprehensive approach to property selection and purchase. Working in concert with real estate brokers, appraisers, financial analysts, and the building community, we blend professional expertise with financial analytics, including land appraisals, population and income growth, expected valuation increase and valuable attributes of the terrain to identify premium properties of promising valuation growth. </p>
    <p>Our adherence to the highest of standards of exclusivity and area stability has proven key to our success in providing investors with sound investment opportunities offering impressive upside.</p>
    </div></div>

    Hope it helps.

    #329879

    derekyoungtomo
    Participant

    Great, thanks! Now, how do I wrap a div around the div and text in Cornerstone? I see the block element, but it requires at least 2 columns, and I only need one.

    #329916

    Zeshan
    Member

    Hi there,

    Please ignore our previous reply. This issue looks more likely related to your sidebar menu (About Us menu). Are you using any custom JS code that is disabling the default functionality of that menu’s links? If so, I’d advise removing it, and seeing if it resolves the issue.

    Let us know how it goes.

    Thanks!

    #330038

    derekyoungtomo
    Participant

    Nope, no custom JS regarding click events. The only JS I have is looks for the first words on the sidenav to make them italic.

    (function(a){var b={init:function(b,c,d){this.numWords=c||1,this.config=a.extend({},a.fn.styleWords.defaults,d),this.el=b,this.$el=a(b),this.updateHTML()},updateHTML:function(){var a=this;this.$el.html(function(b,c){return a.createWrapper(c)})},createWrapper:function(b){var c=b.split(" "),d=this.config.tag,e;return delete this.config.tag,e=a(d,this.config).text(c.splice(0,this.numWords).join(" ")),e=a("<div>").append(e).html(),[e].concat(c).join(" ")}};a.fn.styleWords=function(a,c){var d=Object.create(b);return this.each(function(){d.init(this,a,c)})},a.fn.styleWords.defaults={tag:"<span>","class":"firstWordEM"}})(jQuery)
    
    jQuery(function($) {
      $('li.firstWord a').styleWords();
    });
    #330112

    Zeshan
    Member

    Hi there,

    This issue looks related to the CSS code you have in your child theme’s style.css file. If I disable the styling from that file, links work just fine. So, I’d advise to start by removing your child theme CSS changes, then slowly adding them back to identify which code is the issue. That way you can find the issue and adjust the CSS accordingly.

    Thanks!

    #331190

    derekyoungtomo
    Participant

    Thanks for the reply. I suspect it has something to do with the overflow scroll div on the right because once that element gets into play, the whole left nav isn’t functional. I’ll keep trucking along to find a solution.

    #331252

    Zeshan
    Member

    You’re welcome! Have a good day. 🙂

    #331265

    derekyoungtomo
    Participant

    FYI, I found a decent workaround. I installed a script that converts my hrefs into onClicks. Problem solved. Again, thanks for all your help in trouble-shooting the error.

    #331366

    Zeshan
    Member

    Nice! You’re welcome! 🙂