Code clean to make snapping more accurate. Using jQuery instead DOM methods for better understandability.