Ajax-图片加载

I'm trying to create a function that shows the images from a html page when I select the categories on html page. This is the function that I created:

.js file

function getWorksContent(cat){
    var _category = cat;
    if (worksContentGot == 0) {
        $.ajax({
            type : 'POST',
            url  : '/images.html',
            data : {category : _category},
            beforeSend : function(){
                worksContentGot = 1;
            },
            success : function(data){
                $(".rightSide").html(data).fadeIn('slow');
                worksContentGot = 0;
                console.log(data);
            }
        });
    }
}

This is the link for categories in html file.

<div class="worksItem anim400" data-id="1" data-top="32vh"  style="top:32vh;" data-cat="logo"><h2>Logo Tasarımı <span class="plus">+</span><span class="times">x</span></h2></div>

But I want to show spesific images for each category. How can I do this? Thanks!