Filter entries with AJAX How would I sort blog entries displayed using AJAX?

What I want to achieve is initially show all posts from a channel (All) but then let my users sort through these posts with a sub navigation using the categories I've applied to the channel entries.

I can doing basic templating in CraftCMS but there seems to be very little clear documentation on how to this.

Thank you
For filtering entries using JS, you could use Isotope JS

First, in your markup give each entry class attribute representing id of category that entry has:

{% for entry in entries %}
&lt;a href="{{entry.url}}" class="category-{{entry.categoryField.one().id ?? null}}"&gt;{{entry.title}}&lt;/a&gt;
{% endfor %}


Then, you will be able to show entries related only to a specific category using JS code like this:

$grid.isotope({ filter: '.category-5' });


..assuming you defined your isotope grid earlier as $grid. In this example, Isotope will show all entries related to the category with id 5.