My recommendation is buy the O'Reilly book to have it on hand as a reference. But don't try a cover-to-cover read, because that can be much too daunting.
Just using cut-and-paste hands you the fish without teaching you how to fish. But trying to use O'Reilly in isolation is like getting a degree in marine biology before you buy your first rod and reel. You need the practical recipes to stay interested in the deeper theory.
The first book I started with "java script for the world wide web" it is a visual quick start guide by Tom Negrino and Dori Smith. It is a cook book style but I found it to be alot of help learning the concepts. It helped me to get into the O'Reilly book.