"Fluid Simulation for Computer Graphics" by Robert Bridson would be my suggestion for getting started with grid-based methods. The SIGGRAPH course notes on his website are very similar to the 1st edition. [1] It's no longer the state of the art (which is probably APIC), but the new methods are all based on the same fundamentals.
Particle-based methods like Smoothed Particle Hydrodynamics (SPH) are simpler to implement and are more intuitive than grid-based methods, but they're also harder to analyze mathematically. SPH is the method used by PixelJunk Shooter. "Fluid Simulation for Video Games" by Michael Gourlay is mostly about a different fluid technique (vortons), but does include SPH. [2]
One of the prices is the book "HTML5 Games: Novice to Ninja" [1]. However the best way to learn is to read other code. Look at the js13kgames entries [2]. There are more than 1000 games entries. All with source code.