lewiskg / movie-history

0 stars 0 forks source link

Navbar link action #11

Closed zoeames closed 6 years ago

zoeames commented 6 years ago

Story

As a user, when I click on the navbar, the view should change.

Acceptance Criteria

When the user click on My Movies link Then they should see an h1 tag that says "My Movies"

When the user click on Search link Then they should see an h1 tag that says "Search Movies" And they should see search bar And if they search for movies the movies should show up

zoeames commented 6 years ago

Comment by zoeames Tuesday Oct 17, 2017 at 05:19 GMT


Wireframes:

search mymovies
zoeames commented 6 years ago

Comment by zoeames Tuesday Oct 17, 2017 at 05:19 GMT


modify index.html

  1. in navbar add ids to the three links
  2. add div with "#myMovies" that has an h1 tag in it
  3. add div with "#search" that has an h1 tag, the search input, #movies div
zoeames commented 6 years ago

Comment by zoeames Tuesday Oct 17, 2017 at 05:22 GMT


modify events.js

Add function: myLinks - click events that checks the id of event.target and:

  1. if search link in nav is clicked it shows search div and hides myMovies div
  2. if my movies link in nav is clicked is shows myMovies div and hides search div
zoeames commented 6 years ago

Comment by zoeames Tuesday Oct 17, 2017 at 05:22 GMT


modify main.js

call events.myLinks(); right after retrieveKeys