Closed walter-0 closed 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:
Good catch. Fixed that div.
Overindented, oops
Is there any difference? Did you actually validate your HTML?
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.
This stands out to me:
$('#qtitle' + this.question.id).append...
Isn't qtitle
a variable? You have it inside a string.
Yes, but I think it should either be renamed to entry or entry-container. Our naming is not integrated.
I think the problem here is you're selecting $(".question-title")
. There are multiple question-title
s 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.
I'm going to close this. Feel free to open a new one linking to this if need be!
Okay, thanks for trying.
Did my last comment not work? I didn't hear back from you!
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.
Okay!
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)
And here is the corresponding questionView.js
What happens now is all the entries are being placed in one entry div.
And each of these is being given an id
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.