Giter Site home page Giter Site logo

rodneycurl / parallax_mouse Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ga-wdi-exercises/parallax_mouse

0.0 2.0 0.0 24 KB

[javascript, css, responsive]

Home Page: http://ga-wdi-exercises.github.io/parallax_mouse/

HTML 20.19% CSS 26.71% JavaScript 53.10%

parallax_mouse's Introduction

Cats, Dogs & Pandas?

Warmup to practice manipulating the DOM & Events with jQuery. You should use jQuery for all of the following.

Commit 1

When the mouse moves within the body, console.log the x and y coordinates. The docs on mousemove may be helpful here.

Commit 2

Instead of using console.log, replace the text of the h1 with the current coordinates of the mouse.

Commit 3

When the mouse moves, change the css of each of your images so that the margin-left and margin-top change along with the x and y coordinates of your mouse. Read the docs on css. Try dividing the x and y coordinates by a factor (anywhere from 6 - 20) before setting your margin, and make this factor different for each image.

Commit 4

Have it so that when you click on any image, it either adds or removes the ".border" class

Bonus 1

Have it so that when you click on the body, it freezes position of the images.

Check out the documentation .off()

Bonus 2

If I click on an image now, for some reason it is freezing the position of all the images. All I want it to do is add or remove the border though. How do I stop that from happening?

What is this? A hint? What the heck is event propagation?

parallax_mouse's People

Contributors

rodneycurl avatar jshawl avatar superbuggy avatar robertakarobin avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.