You are missing parenthesis: )
at the end of console.log otherwise it would work.
$('.container').waypoint(function() {
console.log("id of element: " + $(this).attr('id'));
});
If you are confusing, you can use like this too:
$('.container').waypoint(function() {
var $this = $('.container');
console.log("id of element: " + $this.attr('id'));
});