For my website, I have tried to add ajax so that the content of my menu is loaded without the page being refreshed. However, instead of loading the content of my menu link, the code is reloading everything on the page like the image below

enter image description here

I have used the Jquery Ajax code below to load the menu links:

  $(document).ready(function () {
    $('ul.menu.hierarchical-taxonomy-menu.block-taxonomymenu__menu a').bind('click', function (e) {
      var page = $(this).attr('href');


I hope you can help me with this issue. Thanks in advance

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.