Tagged: section id
-
AuthorPosts
-
June 12, 2017 at 12:40 pm #806850
How can I hide the Section Id from appearing in the URL – http://infruid.com/#av_section_2…
It shows up everytime someone clicks the down arrowJune 12, 2017 at 5:57 pm #806986well – this is a colorsection – set up his ID to features by opening the colorsection element – scroll down – there is a field for “For Developers: Section ID”
June 13, 2017 at 6:45 am #807254Ya but I want to hide that ID from appearing on the URL
June 13, 2017 at 2:26 pm #807475hm i thought if you are navigating to features it might be ok if there is in the url features (even from seo aspect)
June 14, 2017 at 2:47 pm #808022Hi ymahesh,
Well, to do that, you will need to build anchor navigation in a bit different way, here is a proposed solution:
https://stackoverflow.com/a/39596741 (https://stackoverflow.com/questions/39596532/html-link-to-anchor-without-changing-url/)If you need further assistance please let us know.
Best regards,
VictoriaJune 15, 2017 at 7:40 pm #808694well for onepage solutions it works with this snippet – but to find a solution which does not change the url ( append #IDs) coming from a different site was difficult.
function scroll_without_hash() { ?> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('a[href*="#"]').on('click', function(event) { event.preventDefault(); var hash = this.hash; jQuery('html, body').animate({scrollTop: jQuery(hash).offset().top}, 900); }); }); </script> <?php } add_action('wp_footer', 'scroll_without_hash');you can jump from that site to the IDs and the url does not change.
you can jump to other sites – but:
you can not jump from start page to that anchors ( submenu 8-columns: Marke1 und contact)
i can not solve it (for now – i have to grill now for my family) :lol:-
This reply was modified 8 years, 4 months ago by
Guenni007.
June 18, 2017 at 10:45 am #809504i think we must do it via url split .
so that a jump to the url before the # can be done – and then after it the scroll to the ID can start – than like in my example above without changing that part before the #. -
This reply was modified 8 years, 4 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
