Giter Club home page Giter Club logo

hs-code-club-jquery-methods-card-flipper-web-1116's Introduction

Card Flipper

Build out a virtual trading card app using jQuery!

Today, you'll be building out a web app for viewing virtual trading cards. You'll be able to flip the cards over by clicking on them using jQuery! Check out a live example here

Let's Get Started

Step 1:

Open this lesson by clicking Open at the top of this page. You'll want to have index.html, css/style.css, and js/card.js open in the Nitrous text editor. You'll want to have index.html open in the browser as well. Take a look at the How To: Open A Lab from Unit 1 for a refresher on how to get this done!

When you open the site in the browser, you should see one Puppy Trading Card with an image of a puppy and the text My Favorite Puppy and two blank cards beneath it. We've written the code for the first card for you.

Step 2:

Take a look in the index.html file in the Nitrous text editor. You should see the already written code for the first puppy card, as well as the template for the second and third cards.

Go ahead and add text and images to the front and back of the cards - these are identified by <figure> elements and classes. You can mimic the completed card for some help.

Step 3:

  • In the js/card.js file, add a jQuery event handler for clicking the div with id of card-two and another click event for the div with the id card-three. We've set up the first click event for you.

The click event should use the toggleClass method. If the card is on the front, it should add the class of flipped. If it's on the back, it should remove that class.

Save your work and refresh in the browser. Try clicking the cards and watch them flip!

Step 4:

Save your work and enter learn submit in terminal enter learn submit to complete the lab.

Bonus

Add styling in css/style.css and make it look pretty!

Hints

Share Share Share!

Don't forget to take a screen shot of your code or playing cards and share with #flatironcodeclub and #jquerycardflipper

Reminder

Don't forget to shut down your server by clicking control and c.

View Card Flipper on Learn.co and start learning to code for free.

hs-code-club-jquery-methods-card-flipper-web-1116's People

Contributors

ipc103 avatar victhevenot avatar dfenjves avatar

Watchers

James Cloos 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.