Got a weird little problem.
I want to create the text hover on an item to display that item\'s \"description,\" which is an attribute of that item\'s model. So I ba
Insert double qutoes for title in the div tag
<div title="<%= item.description %>" ><%= item.name %></div>
Change this line:
<div title=<%= item.description %> ><%= item.name %></div>
to this:
<div title="<%= item.description %>" ><%= item.name %></div>
I think you need to add quoting to the HTML in the view. If you view source on the generated HTML, I'm willing to bet it looks like this:
<div title=This is a super cool item! >
The browser will interpret that as the div
having a title
with the value This
, and then attributes named is
, a
, super
, cool
, and item!
.
If you change your view to this:
<div title="<%= item.description %>" >
Then your generated HTML should look like this:
<div title="This is a super cool item!" >