The Texas Language Technology Center of the University of Texas has a very nice online grammar of German, Grimm Grammar.
A snippet from their about page:
Welcome to Grimm Grammar, an irreverent revival and shameless exploitation of 19th-century Grimm Fairy Tales for honorable pedagogical purposes. Fortunately for you, Dear Reader, thirty-six characters from these fairy tales have returned to 21st century Germany (their precise location cannot be revealed for privacy reasons) to model all things grammatical … anything the most eager language learner may wish to know about the German language.
This online grammar reference was created for lower-division language courses at the University of Texas, but any beginning or intermediate learner of German may use it completely free of charge, as long as he or she is willing to take a trip to the imaginary world of Grimm Grammar … the characters of which are grumpy and gorgeous, scary and smarmy, witty and wicked!
If you’re getting started in German, check it out; you could probably skip the introductory German grammar book, and instead just wait until you need a copy Hammer’s.