• Resolved Byron Hasegawa

    (@byron222)


    I want to remove the anchor link when I jump to another page changing the select of the filter form.

    Ex)
    https://test.com/office/area/tokyo/genre/animal/#anchor1

    then, when I select another AREA(paris) and jump to that page, the anchor still there….like

    Ex result)
    https://test.com/office/area/paris/genre/animal/#anchor1

    I want to remove the anchor when I jump to another page.

    This is what I want
    https://test.com/office/area/tokyo/genre/animal/#anchor1
    ↓
    https://test.com/office/area/paris/genre/animal/

    Now I using this code to jump when I change my select form.

    
    $('.beautiful-taxonomy-filters-select').change(function(){
         $(this).closest('#beautiful-taxonomy-filters-form').submit();		
    });
    

    I try this but, remove the anchor and still in the same page…

    if(location.hash){
        location.href = location.href.replace(/#.*/, "");
    }

    What can I do?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Byron Hasegawa

    (@byron222)

    Please, I need this…

    If is difficult, I will try another way.

    Plugin Author Jonathandejong

    (@jonathandejong)

    Hi Byron,

    Please be aware that this supportforum is free *and* only in regards to BTF functionality. If you need help with all sorts of stuff and need a fast answer you are probably better off asking at stackoverflow ??

    As for the hash you should look into window.history.pushState.

    Something like:

    
    $('.beautiful-taxonomy-filters-select').change(function(){
         window.history.pushState("", document.title, window.location.pathname);
         $(this).closest('#beautiful-taxonomy-filters-form').submit();		
    });
    

    might work.

    Thread Starter Byron Hasegawa

    (@byron222)

    Roger!!

    Thank you very much!

    Was perfect to my site!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘remove the anchor link’ is closed to new replies.