ga-wdi-exercises / pbj-project3

[project]
0 stars 2 forks source link

Trouble with html #53

Closed walter-0 closed 9 years ago

walter-0 commented 9 years ago

We are trying to put the front end js and css together but we are having naming issues. Below is the html for our index view (still a single page app)

screen shot 2015-08-27 at 1 11 36 pm

And here is the corresponding questionView.js

screen shot 2015-08-27 at 1 12 27 pm

What happens now is all the entries are being placed in one entry div. screen shot 2015-08-27 at 1 13 08 pm

And each of these is being given an id screen shot 2015-08-27 at 1 13 39 pm

What should happen is each question ( 1, 2, 3) should have their own entry div, and the title of each question should go into its entry-title.

RobertAKARobin commented 9 years ago

Fix your indenting with the divs! It looks like you have a div that you forgot to close, but I can't tell. If you're not sure either, run it through the HTML validator:

http://validator.w3.org

walter-0 commented 9 years ago

Good catch. Fixed that div.

screen shot 2015-08-27 at 1 43 07 pm

walter-0 commented 9 years ago

Overindented, oops

screen shot 2015-08-27 at 1 52 43 pm

RobertAKARobin commented 9 years ago

Is there any difference? Did you actually validate your HTML?

walter-0 commented 9 years ago

No. The HTML is valid. Our issue is partially with renaming things in the JS but we're confused about how to organize the DOM elements so that we can see what we want.

RobertAKARobin commented 9 years ago

This stands out to me:

$('#qtitle' + this.question.id).append...

Isn't qtitle a variable? You have it inside a string.

walter-0 commented 9 years ago

Yes, but I think it should either be renamed to entry or entry-container. Our naming is not integrated.

RobertAKARobin commented 9 years ago

I think the problem here is you're selecting $(".question-title"). There are multiple question-titles on the page. So when you do $(".question-title").append, jQuery isn't sure which one you want to append to, so it just picks the first once, hence why all your questions are going to the same place. You need to specify which question-title you want.

RobertAKARobin commented 9 years ago

I'm going to close this. Feel free to open a new one linking to this if need be!

walter-0 commented 9 years ago

Okay, thanks for trying.

RobertAKARobin commented 9 years ago

Did my last comment not work? I didn't hear back from you!

walter-0 commented 9 years ago

It sort of worked. We decided to start over with the view we were working on. Matt's here now so hopefully we can solve it soon.

RobertAKARobin commented 9 years ago

Okay!