# Hover effect for column data field

**URL:** <https://www.ruby-forum.com/t/hover-effect-for-column-data-field/162355>\
**Category:** Rails\
**Created:** [March 9, 2009, 6:35am UTC](https://www.ruby-forum.com/t/hover-effect-for-column-data-field/162355 "2009-03-09T06:35:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![salil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@salil](https://www.ruby-forum.com/u/salil)\
**Post date:** [March 9, 2009, 6:35am UTC](https://www.ruby-forum.com/t/hover-effect-for-column-data-field/162355/1 "2009-03-09T06:35:54Z")

</div>

Hi All  
i have a table column field which is of 50 characters i am showing only  
10 out of it so that my layout remain proper. what i want is when i  
hover on that field it should show me all the content of that field AT  
THE SAME ROW.So when i hover on a that column field it should show me  
all the field data on the same row. I don’t want to use title parameter  
of HTML.

I don’t know where to post this topic? in rails is there any way to do  
it?  
or i have to implement it only using javascript and css.

Ragers,

Salil

---

<div class="post-metadata">

**Author:** ![salil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@salil](https://www.ruby-forum.com/u/salil)\
**Post date:** [March 9, 2009, 8:28am UTC](https://www.ruby-forum.com/t/hover-effect-for-column-data-field/162355/2 "2009-03-09T08:28:26Z")

</div>

you’ll want to do this client-side to have no client/server-  
communication and thus instant loading of your content. rails ships  
with prototype, but it’s still javascript. so, to answer your  
question: use javascript and css. add an observer for mouseover and  
then do whatever is necessary (i.e. change div-overflow or z-  
index,…).

---

<div class="post-metadata">

**Author:** ![salil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@salil](https://www.ruby-forum.com/u/salil)\
**Post date:** [March 9, 2009, 1:21pm UTC](https://www.ruby-forum.com/t/hover-effect-for-column-data-field/162355/3 "2009-03-09T13:21:52Z")

</div>

You might find this helpful:  
[http://tracesof.blogspot.com/2009/02/creating-tooltips-using-rails-helper.html](http://tracesof.blogspot.com/2009/02/creating-tooltips-using-rails-helper.html).  
Using this code you can wrap the content of your table fields in a  
“with\_tooltip” block, which should give you the desired results.  
There are plenty of other resources on the same topic to be found on  
the web of course …
