• Following the instructions on the customize sidebar in Home Landing Page Section, I made a custom menu link to #section1 — however, it is not functioning at all when I click the menu, and will only open if I right click and open link in a new tab. Any help is appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Can you share website URL?

    Thread Starter beth_a_a

    (@beth_a_a)

    My url is http://dev-annualreport-wgbh.pantheon.io/chapter-1/

    I have the menu for “Contents” linked to #section1, which should open to this page where is says “Link here”: http://dev-annualreport-wgbh.pantheon.io

    I have previously been playing with just linking to an a name in my html, but neither has yielded any results so far. Any insight is appreciated, thanks!!

    Thread Starter beth_a_a

    (@beth_a_a)

    Actually now it’s linking to the chapter 1 page instead of “section 1” on the first page — I’ll revert it back to my a-name link so you can see what I was ideally hoping for

    Tanay

    (@tanaykhandelwal-1)

    Hey beth_a_a,

    The problem is in ../fullscreen-lite-child/js/custom_script.js file actually the code should be as follow

    jQuery( ".toggleButton" ).click(function() {
      jQuery( ".storyOneExpanded" ).slideToggle( "slow" );
    });

    and enqueue your script in the footer at this time your script is coming even before the core jQuery file loads. You can do so in child theme’s functions.php

    function fullscreen_lite_child_enqueue(){
        wp_enqueue_script('fullscreen-lite-child-custom-js',get_stylesheet_directory_uri().'/js/custom_script.js', array('jquery'), '1.0', true);
    }
    add_action('wp_enqueue_scripts', 'fullscreen_lite_child_enqueue');

    Let me know if it doesn’t works or mark ticket resolved otherwise.

    Regards,
    Tanay Khandelwal

    Thread Starter beth_a_a

    (@beth_a_a)

    Hi Tanay,

    Thanks for the help!

    This didn’t seem to affect the issue that I’m having — the jquery code that you fixed for me (thank you btw!) is for something that I haven’t built out yet, but I’m appreciative that your fix has made sure that it wasn’t part of the problem!

    What’s mystifying me the most is that the “contents” link will open correctly if right clicked and opened in a new tab — but won’t open otherwise.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Menu link to section not working’ is closed to new replies.