ajax for filtering posts by category in wordpress loops

A piece of javascript/jquery:

$("#queryMenu ul li a").click(function(){
    var currentCategory = $(this).attr('id');
    $.ajax({
        type: 'post',
        url: 'ajax-category.php', //sometimes I'm using bloginfo to get current path: url: '<?php bloginfo('template_url'); ?>/ajax.php',
        data: {
            currentCategory: currentCategory
        },
        success: function(data) {
            console.log(data);
        }
    });
});

Put right path in url. Use $_REQUEST['currentCategory'] inside ajax-category.php to get category ID…