Tagged: x
-
AuthorPosts
-
November 8, 2016 at 6:32 am #1248571
Paul RModeratorHi,
Please add the code below in Custom > Edit Global Javascript.
function getUrlParameter(sParam) { var sPageURL = decodeURIComponent(window.location.search.substring(1)), sURLVariables = sPageURL.split('&'), sParameterName, i; for (i = 0; i < sURLVariables.length; i++) { sParameterName = sURLVariables[i].split('='); if (sParameterName[0] === sParam) { return sParameterName[1] === undefined ? true : sParameterName[1]; } } };Hope that helps.
November 8, 2016 at 7:35 am #1248623
sandra.iParticipantThis reply has been marked as private.November 8, 2016 at 8:43 am #1248721
LelyModeratorHi There,
Are you referring to 3 other buttons on the right sidebar? If yes, we just need to add the correct link for those menu. If not please clarify which buttons on what page.
November 8, 2016 at 8:54 am #1248738
sandra.iParticipantHi
Yes exactly those buttons
November 8, 2016 at 10:02 am #1248829
JoaoModeratorHi There,
Based on your comment I am not sure if you managed to solve the issue.
If you need further help please let us know.
Thanks
Joao
November 8, 2016 at 10:15 am #1248857
sandra.iParticipantYes still need help with coding those buttons, thank you
November 8, 2016 at 10:05 pm #1249571
LelyModeratorHello There,
Please update the javascript to this:
(function($) { var menu = $('#lab_tests_sidebar'), target = $('#started_target'); var section = getUrlParameter('section'); if (window.location.search.indexOf('section=cdsa') > -1) { target.load("http://www.rochesterclinic.co.uk/clinic/lab-tests/cdsa/" + " .entry-content.content"); } if (window.location.search.indexOf('section=adrenal') > -1) { target.load("http://www.rochesterclinic.co.uk/clinic/lab-tests/adrenal/" + " .entry-content.content"); } if (window.location.search.indexOf('section=oat-test') > -1) { target.load("http://www.rochesterclinic.co.uk/clinic/lab-tests/oat-test/" + " .entry-content.content"); } if (window.location.search.indexOf('section=female-hormones') > -1) { target.load("http://www.rochesterclinic.co.uk/clinic/lab-tests/female-hormones/" + " .entry-content.content"); } $('#lab_tests_sidebar a').each(function() { var element = $(this); element.on('click touchend', function(e){ console.log(element.attr('href')); target.load(element.attr('href') + " .entry-content.content"); e.preventDefault(); }); });To access each page via URL something like this:
http://www.rochesterclinic.co.uk/clinic/lab-tests/?section=cdsa http://www.rochesterclinic.co.uk/clinic/lab-tests/?section=adrenal http://www.rochesterclinic.co.uk/clinic/lab-tests/?section=oat-test http://www.rochesterclinic.co.uk/clinic/lab-tests/?section=female-hormonesHope this helps.
November 9, 2016 at 1:52 am #1249703
sandra.iParticipantyes that’s working perfectly, thanks!
November 9, 2016 at 4:06 am #1249785
Paul RModeratorYou’re welcome! 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1246872 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
