Check the documentation (and any other examples you may have seen) more carefully. .ready() expects a function as the first argument, but you are providing an object instead. The documentation says:
The .ready() method is typically used with an anonymous function:
$( document ).ready(function() {
// Handler for .ready() called.
});
Using your code it would be like this:
$(document).ready(function() {
$('#es').click(function(){
console.log("hola");
});
});
Or you could use the shorthand version:
$(function() {
$('#es').click(function(){
console.log("hola");
});
});
N.B.It needs to be given a function, so that it can save that function for later, and then execute it when the page is ready. This type of saved-for-later function reference is often referred to as a "callback" function.
readyexpects a method as the first param, you're passing an object. This will never work. Have you read the jQuery documentation forready? It has some good examples.