Hi, I'm pretty sure this is a simple problem but I can't seem to work it
out.
I have a series of news stories and I would like the body of the story
to be displayed (using a visual_effect toggle) when the user clicks on
the title.
The toggle works ok, but it does not matter which title I click on, only
the first story is ever displayed.
Hi, I'm pretty sure this is a simple problem but I can't seem to work it
out.
I have a series of news stories and I would like the body of the story
to be displayed (using a visual_effect toggle) when the user clicks on
the title.
The toggle works ok, but it does not matter which title I click on, only
the first story is ever displayed.
Your problem (which you should be able to see if you looked at the
html) is that all of your divs have as id the string newsitem.id.
When you write ('newsitem.id') (not sure what you were trying to
accomplish with the parentheses no interpolation is taking place,
that's just a string literal.
if you want interpolation then you need to use double quotes and #{}
to indicate what should be interpolated, eg "my name is #{ name } "