Tagged: x
-
AuthorPosts
-
August 9, 2016 at 3:06 pm #1124330
armintzParticipanti’m currently using the following custom link for my ‘home’ link in the nav menu:
/#cs-content
the reason i do this is because i have a video above the masthead on the home page and it wouldn’t be good user experience to send the user to the video every time they click the ‘home’ link in the navigation menu.
anyway, /#cs-content works fine for my site’s when the logo is inline with the navmenu, but not when the logo is on top of the navmenu (stacked) – what would the appropriate link be for a stacked layout? thanks
August 9, 2016 at 3:09 pm #1124332
armintzParticipantThis reply has been marked as private.August 9, 2016 at 7:49 pm #1124752
FriechModeratorHi There,
Thanks for writing in! The home link on your menu works fine on my end. Would you mind providing us with a little more clarification on what it is you’re wanting to do. We’ll be happy to provide you with a response once we have a better understanding of the situation.
Thanks.
August 10, 2016 at 11:08 am #1125737
armintzParticipantthe home link currently takes you to the navmenu on the home page (see first screenshot), and not to the logo above the navmenu on the home page like it should (see second screenshot)
August 10, 2016 at 5:08 pm #1126258
RadModeratorHi there,
You mean move the logo along with the navbar when it scrolls? If yes, please add this code to Admin > Appearance > Customizer > Custom > Javascript
jQuery( '.x-logobar' ).prependTo('.x-navbar');Hope this helps.
August 10, 2016 at 10:20 pm #1126653
armintzParticipantno, i don’t want to make the logo sticky.
i want the home link in my navmenu to take the user to the portion of the header which displays my logo (see 2nd screenshot in my previous post)… this is just above the navbar.
the home link currently send the user below the logo, directly to the navmenu (when i use
/#cs-contentas my home link)August 11, 2016 at 2:49 am #1126866
Rue NelModeratorHello There,
Thank you for the clarifications! To resolve this issue, please add the following JS code in the customizer, Appearance > Customize > Custom > Javascript
(function($){ $('.x-brand').attr('id', 'top-page'); })(jQuery);And then you must change the link from
/#cs-contentto#top-pageinstead.Hope this helps. Kindly let us know.
August 11, 2016 at 7:17 am #1127085
armintzParticipantunfortunately this did not work.
August 11, 2016 at 10:10 am #1127296
LelyModeratorHi There,
Can you try updating the javascript code to this:
(function($){ $('.x-brand').attr('id', 'top-page'); $('#menu-item-71 a').click(function(e){ e.preventDefault(); var hash = $(this).attr('href').split("#").slice(-1)[0]; $('html,body').animate({ scrollTop: $('#' + hash).offset().top) },700 ,'swing'); }); })(jQuery);Do let us know how this goes.
August 11, 2016 at 1:06 pm #1127541
armintzParticipantissue remains the same
August 11, 2016 at 7:29 pm #1127935
RadModeratorHi there,
Please replace it with this one,
(function($){ $('.x-brand').attr('id', 'top-page'); $('#menu-item-71 a').click(function(e){ e.preventDefault(); var hash = $(this).attr('href').split("#").slice(-1)[0]; $('html,body').stop().animate({ scrollTop: $('#' + hash).offset().top },700 ,'swing'); }); })(jQuery);Hope this helps.
August 11, 2016 at 7:35 pm #1127943
armintzParticipantissue is still the same.
August 12, 2016 at 12:40 am #1128350
Rue NelModeratorHello There,
Sorry if it didn’t work out! Could you please update the code and use this instead:
(function($){ $('.x-brand').attr('id', 'top-page'); $('#menu-item-71 a').click(function(e){ e.preventDefault(); var hash = $(this).attr('href').split("#").slice(-1)[0]; var position = $('#' + hash).offset().top - 40; $('html,body').stop().animate({ scrollTop: position },700 ,'swing'); }); })(jQuery);If this still do not work, would you mind providing us the url of your site with login credentials so we can take a closer look? This is to ensure that we can provide you with a tailored answer to your situation.
To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / passwordDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thank you.
August 12, 2016 at 6:58 am #1128644
armintzParticipantsame issue.
my url and login credentials were posted in the 2nd post of this thread.
August 12, 2016 at 4:38 pm #1129237
RadModeratorHi there,
It’s not working because the two recent and recommended changes aren’t applied. I can still see the old code that is provided at #1127296. You can verify that by viewing your site’s source code through your browser (right click and hit “view source code”).
The login on your second reply is for authentication for viewing your site. What we need is your WordPress admin login.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1124330 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
