Tagged: x
-
AuthorPosts
-
October 31, 2016 at 3:54 am #1237552
tituwebParticipantHi, i want to active menu-active option on http://sinhafwl.com/sfl how to do I’ve tried with https://community.theme.co/kb/how-to-setup-one-page-navigation/ this. but i can’t
October 31, 2016 at 4:09 am #1237564
LelyModeratorHi There,
Please try adding this code on Appearance > customize > Custom > Edit Global Javascript:
jQuery(document).ready(function($) { /** * This part handles the highlighting functionality. * We use the scroll functionality again, some array creation and * manipulation, class adding and class removing, and conditional testing */ var aChildren = $("nav li").children(); // find the a children of the list items var aArray = []; // create the empty aArray for (var i=0; i < aChildren.length; i++) { var aChild = aChildren[i]; var ahref = $(aChild).attr('href'); aArray.push(ahref); //alert(ahref); } // this for loop fills the aArray with attribute href values $(window).scroll(function(){ var windowPos = $(window).scrollTop(); // get the offset of the window from the top of page var windowHeight = $(window).height(); // get the height of the window var docHeight = $(document).height(); for (var i=0; i < aArray.length; i++) { var theID = aArray[i]; var divPos = $(theID).offset().top;// get the offset of the div from the top of page divPos = divPos - 135; // fix for header hight and padding. In our case 90px+45px var divHeight = $(theID).height(); // get the height of the div in question divHeight = divHeight +90;// correction for our previous fix so that end of div is calculated properly. This is height of fixed header if (windowPos >= divPos && windowPos < (divPos + divHeight)) { $("a[href='" + theID + "']").parent().addClass("current-menu-item"); } else { $("a[href='" + theID + "']").parent().removeClass("current-menu-item"); } } }); });Hope this helps.
October 31, 2016 at 6:23 am #1237695
tituwebParticipantNo Change
October 31, 2016 at 6:24 am #1237697
tituwebParticipantThis reply has been marked as private.October 31, 2016 at 7:12 am #1237746
Paul RModeratorThis reply has been marked as private.October 31, 2016 at 9:35 am #1237900
tituwebParticipantHi,
This is awesome ……. thank you very much what was the problem i need to activate it more two sites as well.
October 31, 2016 at 9:52 am #1237938
JoaoModeratorGlad to hear it,
Joao
November 1, 2016 at 11:31 am #1239382
tituwebParticipantHello dear, I need to add menu active option for those sites sinhafwl.com/skil and sinhafwl.com/skdil, which is you already did for me on sinhafwl.com/sfl. can you please tell me what is the procedure to active it.
November 1, 2016 at 12:42 pm #1239465
Nabeel AModeratorHi again,
I tried to check both of your sites sinhafwl.com/skdil and sinhafwl.com/skil but they are not loading on my end, can you please double check the URL?
Thanks!
November 2, 2016 at 12:00 am #1240268
tituwebParticipantNovember 2, 2016 at 4:24 am #1240454
Paul RModeratorHi,
Please make sure you have selected your menu in the one page dropdown under page settings.
http://screencast.com/t/TpT1HuiYfhx
https://community.theme.co/kb/how-to-setup-one-page-navigation/
Thanks
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1237552 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
