Issue with appending html to list

Issue with appending html to list

I'm trying to take my cat_id and append it to #id- so that the points are appended to the correct list.

  1. function load_sidebar_points(){
            downloadUrl("cat_points.php", function(data) {
                var point_xml = data.responseXML;
                var markers = point_xml.documentElement.getElementsByTagName("marker");
                for (var i = 0; i < markers.length; i++) {
                    var id = markers[i].getAttribute("id");
                    var name = markers[i].getAttribute("name");
                    var cat_id = markers[i].getAttribute("cat");
                   
                    $("#ul-" + cat_id).append('<li><a href="#" id="' + id + '" class="single-location" onclick="addMarker(' + id + ');">' + name + '</a></li>');
                }
            });
        }