Giter Club home page Giter Club logo

facebook-assignment's Introduction

Facebook

This is a long assignment that deals with reading and manipulating the DOM using JavaScript.

Spec

The overall goal is to implement features that listen for user actions that trigger showing/hiding/changing information on the page without performing a request/response refresh.

Clicking 'Like' should...

  • change the text of that link from 'Like' to 'Unlike'
  • update the number of likes that the post/comment has
  • alter the behavior of the link so it behaves as an Unlike link next time it's clicked

Clicking 'Comment' (in the post__actions area) should...

  • Move the cursor into the post's main comment form

Clicking 'Reply' or 'XX replies' should...

  • show the replies area for that comment
  • toggle the behavior of the link so that if it's clicked again, it hides the replies area

Submitting a comment form should...

  • raise an alert() error if nothing has been typed into the textarea
  • update the number of comments/replies
    • This includes changing the text of what used to be a 'Reply' link to now read, '1 replies' (or '1 reply', if you're ambitious).
  • add the comment to the correct location in the comments area

Clicking on someone's name should...

  • show the modal window with their name as the title and their number of friends as the body

Clicking 'Share' should...

  • show the modal window with 'Share _____'s post' (fill in the blank with the post owner's name) as the title and the post's content as the modal's body

When the modal is open...

  • clicking the 'X' should close the modal
  • clicking anywhere in the dimmed-out background area should close the modal

Notes

There is starter HTML and CSS. You will need to modify the HTML to achieve the above spec, but changing the CSS is probably not necessary. If CSS changes are needed, they will probably be very minor.

HTML changes will probably be adding tags, classes, or data attributes to the existing HTML. There might be some moving around of HTML, but you shouldn't need to make too many structural changes to individual HTML blocks.

You cannot add id attributes to any of the HTML elements.

facebook-assignment's People

Contributors

sumeetjain avatar

Watchers

 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.