Add js to only open the closest open box.

Signed-off-by: Zane M. Kolnik <zanematthew@gmail.com>