-
AuthorPosts
-
April 15, 2016 at 7:02 pm #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?April 15, 2016 at 8:28 pm #615124Hey Gralou!
can we please see an example of your web site, so we can help?
Best regards,
BasilisApril 16, 2016 at 2:57 am #615239hello Basilis, I’m working with xampp actualy, its not online.
April 16, 2016 at 3:53 am #615256I 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.
April 17, 2016 at 9:17 am #615752Hi,
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,
RikardJuly 27, 2017 at 1:09 am #830419Hi,
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.
July 27, 2017 at 7:05 pm #830794Any 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.
July 30, 2017 at 7:05 am #831710 -
AuthorPosts
- You must be logged in to reply to this topic.