yurez91 / js-task-move-spider-DOM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move the spider

Task

Move the spider across the wall to a click.

Requirements:

  • The spider center should come exactly under the pointer on click (without crossing the wall edge).
  • The spider must not cross wall boundaries. When the page is scrolled, nothing should break.

Notes:

  • The code should also work with different spider and wall sizes, not be bound to any fixed values.
  • Use properties event.clientX/event.clientY for click coordinates.
  • You must only modify the file src/scripts/main.js

Gif of result

Read the guideline before start

Guideline

Result

About

License:GNU General Public License v3.0


Languages

Language:JavaScript 73.0%Language:CSS 19.4%Language:HTML 7.6%