final page snap class, JS implementation