Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #615082

    Hello, I’m trying to make a onepage site. I know how to use the anchors, but when i click on an anchor link its “jumping” to the anchor.
    I want the same effect as the enfold restaurant demo. How can I fix that?

    #615124

    Hey Gralou!

    can we please see an example of your web site, so we can help?

    Best regards,
    Basilis

    #615239

    hello Basilis, I’m working with xampp actualy, its not online.

    #615256

    I just notice that many things not working on my local server (jquery)) I just make a test on a online server and its working like a charm. =)
    thank you for your fast reply. Problem solved. BUT if someone know how to fix the jquery on a local server, I take lol.

    Thank you again.

    #615752

    Hi,

    You could try adding this to your functions.php file:

    function modify_jquery() {
    if (!is_admin()) {
    	wp_deregister_script('jquery');
    	wp_register_script('jquery', 'https://code.jquery.com/jquery-1.11.3.min.js');
    	wp_enqueue_script('jquery');
    }
    }
    add_action('init', 'modify_jquery');

    Regards,
    Rikard

    #830419

    Hi,
    just found this post which actually describe is my same issue.
    I would like to have the same smooth scrolling effects there is on the enfold restaurant demo rather than having the website directly jumping to the anchor.
    I saw the above code to modify the functions.php file but would like to be sure about where I have to add that code. End of file…beginning…after a certain point…

    I know I could just import the demo, but I would really like to learn how to do it from you guys.

    Thanks for your help.
    Andrea

    • This reply was modified 7 years, 4 months ago by grafica6106.
    #830794

    Any reply, please??

    #update: I tried the above code in my function-enfold.php, doesn’t work.
    #update2: Found the solution by myself. Sharing for anyone in my same situation.
    Basically I was setting the menu custom link in a wrong way in my menu.

    Setting up the menu with your custom link, You DON’T need to copy the whole URL of your page, (example http://mywebsite/mypage/#myanchor) in the URL space, just use #myanchor and then in Navigation Label you put the name you want to appear in the menu.
    So let’s say you want to do the classic “about us” link.
    First of all in the color section, at the bottom in the ID field, you put about without any hashtagg, save. Go back to menu settings, select the custom link and setup the URL writing #about (including the hashtagg) and then About Us in the Label field. Done.
    Works perfectly.
    So my bad, but worth to learn it. Would have been great to have a reply anyway.
    Thanks.

    • This reply was modified 7 years, 4 months ago by grafica6106.
    #831710

    Hi grafica6106,

    Great, glad you got it working and thanks for sharing your solution, much appreciated :-)

    Best regards,
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.