this should be a pretty straightforward question. My app is built on Ruby on Rails (I doubt that this is very important though -- I'm noting this so you all understand the syntax below)
I have these two div:
<div id = "1"><%= user.Name %></div>
<div id = "2">Placeholder</div>
When someone mouses over div with id 1, I would like to replace the content of the div with id 2.
The catch is that the content I want to replace div 2 with is contained in the user object. So ideally, I'd like to set some kind of additional tag on the div that I can lookup on the JavaScript mouseover. Otherwise, I'll have to do an AJAX call that will result in a DB query to pull the relevant data.
I have no idea what that tag would be ... any hints on what I could do?
Thanks! Ringo