document.getElementById( 'foo' );
Here’s how you would grab an element in JQuery.
As you can see, it’s less code to write in JQuery. Not only that, JQuery provides a handful of functions to perform animations and simplify tasks. JQuery isn’t the only library out there to do things like these. It’s not the best either. It’s all a matter of preference.