CMS Development

lindadesigner
Member

Blog Filter

0 Upvotes
5 Replies 5
tjoyce
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Blog Filter

You won't really be able to completely make that a smooth transition between clicking tags but you could make the user experience a lot better by dropping the following script into your template. It checks for the word "tags" in the url and, if it exists, it scrolls down to the filters.

<script>
$(function(){
  if (window.location.href.indexOf("tag") > -1) {
    $('html, body').animate({
        scrollTop: (($('.custom-topics').offset().top - 120))
    },500);
  }
});
</script>

tim@belch.io
0 Upvotes
lindadesigner
Member

Blog Filter

Thank you so much. But it is not working on "Alle" (All) and "Julekalender" (Christmas Calendar). Why? 

https://blog.make.as/

0 Upvotes
tjoyce
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Blog Filter

It doesn't work on "All" because there is not a word tag in the url. You could update your "all" link to "https://blog.make.as/#tag/all" and it should work there. As for the other link, I could try and debug that. Have you already published the script to the live blog?

0 Upvotes
lindadesigner
Member

Blog Filter

Ok, but can you test "Julekalender". It is exactly same as other tags. Yes, already published the scipt to the live blog.

0 Upvotes
tjoyce
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Blog Filter

@lindadesigner

That one does work for me, perhaps you're cached in th browser. Try doing a hard refresh with cmd+shift+r OR ctrl+f5 on windows

0 Upvotes