(function($){
    function searchConsultant(consulCityId,consultantName){
        $.ajax({
            type: "GET",
            url: "/tospur/wp-admin/admin-ajax.php",
            data: "action=searchConsultant&consulCityId="+consulCityId+"&consultantName="+consultantName,
            success:function(json){
                for(var i = 0; i <=json.length-1; i++){
                    var name = json[i]["consultantName"];
                    var imgUrl = json[i]["imageUrl"];
                    var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100,"style":"margin-right:50px"});
                    var li = $("<li>").attr("id",json[i]["id"]).append(img).append(name).addClass("consultantImg");
                    $("#consultantList").append(li);
                }
            }
        });
    }
})(jQuery);