Watch this: http://jsfiddle.net/lughino/8uzgd/
in order to capture the elements that are created after the page loads, you need to call on method in this way:
$(document).on('click', '.categories > li a', function(event){
To learn more take a look at the documentation