Use jQuery's fancy selectors, especially the attribute equals one.
Using it, you can select only tags which have a blank href attribute:
$('.list-group-item a[href=""]').click(function(event) {
event.preventDefault();
});
The $('.list-group-item a[href=""]')
selector narrows the collected elements to only those anchor tags with a class of list-group-item
and a blank href.
That means all other anchor tags will work fine.