# Detect row hover in Ignition Perspective

**URL:** <https://forum.inductiveautomation.com/t/detect-row-hover-in-ignition-perspective/98892>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [November 20, 2024, 8:15pm UTC](https://forum.inductiveautomation.com/t/detect-row-hover-in-ignition-perspective/98892 "2024-11-20T20:15:47Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Farhan\_Basheer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/farhan_basheer/32/66759_2.png) [@Farhan\_Basheer](https://forum.inductiveautomation.com/u/Farhan_Basheer)\
**Post date:** [November 20, 2024, 8:15pm UTC](https://forum.inductiveautomation.com/t/detect-row-hover-in-ignition-perspective/98892/1 "2024-11-20T20:15:47Z")

</div>

In Ignition Perspective is it possible to detect that on which row the mouse is hovering in a table using script?

---

<div class="post-metadata">

**Author:** ![diamond](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@diamond](https://forum.inductiveautomation.com/u/diamond)\
**Post date:** [November 20, 2024, 8:22pm UTC](https://forum.inductiveautomation.com/t/detect-row-hover-in-ignition-perspective/98892/2 "2024-11-20T20:22:04Z")

</div>

Not straightforwardly, unless clicking the row.

Yes, by injecting javascript with a Markdown Component. You can find useful code in the the forum.

---

<div class="post-metadata">

**Author:** ![Farhan\_Basheer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/farhan_basheer/32/66759_2.png) [@Farhan\_Basheer](https://forum.inductiveautomation.com/u/Farhan_Basheer)\
**Post date:** [November 20, 2024, 8:29pm UTC](https://forum.inductiveautomation.com/t/detect-row-hover-in-ignition-perspective/98892/3 "2024-11-20T20:29:04Z")

</div>

Any suggestions where can I start from

---

<div class="post-metadata">

**Author:** ![diamond](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@diamond](https://forum.inductiveautomation.com/u/diamond)\
**Post date:** [November 20, 2024, 8:40pm UTC](https://forum.inductiveautomation.com/t/detect-row-hover-in-ignition-perspective/98892/4 "2024-11-20T20:40:49Z")

</div>

> [@Dragging rows in Perspective Table](https://forum.inductiveautomation.com/t/dragging-rows-in-perspective-table/68922/8):
>
> ah it was easy, ignition puts its row id in a data atrribute so it was easy to read. @jasoncoope[dragtable.zip](https://forum.inductiveautomation.com/uploads/short-url/AvXF36eUYUY52tcHnheVhENIotA.zip) (27.7 KB) copy the markdown and add in a custom property on the view you probably will have to adapt the onchange script in the view.custom element to your needs. sometimes the columns seem to move around too when you drag a row... not sure why or how to prevent that... probably clashing with the other drag events on the table xd edit : ahah, turn this off too, well unless you d…

---

<div class="post-metadata">

**Author:** ![Farhan\_Basheer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/farhan_basheer/32/66759_2.png) [@Farhan\_Basheer](https://forum.inductiveautomation.com/u/Farhan_Basheer)\
**Post date:** [November 20, 2024, 9:05pm UTC](https://forum.inductiveautomation.com/t/detect-row-hover-in-ignition-perspective/98892/5 "2024-11-20T21:05:39Z")

</div>

Ok, my last question, what should I do with this .zip file, should I copy it and paste it in my view?  
Or import it in someway?

---

<div class="post-metadata">

**Author:** ![diamond](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@diamond](https://forum.inductiveautomation.com/u/diamond)\
**Post date:** [November 20, 2024, 9:17pm UTC](https://forum.inductiveautomation.com/t/detect-row-hover-in-ignition-perspective/98892/6 "2024-11-20T21:17:27Z")

</div>

You can import the resource it in the designer, by clicking "import" in the upper menu bar.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 21, 2024, 7:43am UTC](https://forum.inductiveautomation.com/t/detect-row-hover-in-ignition-perspective/98892/7 "2024-11-21T07:43:21Z")

</div>

what are you trying to do when hovering?

---

<div class="post-metadata">

**Author:** ![Farhan\_Basheer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/farhan_basheer/32/66759_2.png) [@Farhan\_Basheer](https://forum.inductiveautomation.com/u/Farhan_Basheer)\
**Post date:** [November 21, 2024, 5:48pm UTC](https://forum.inductiveautomation.com/t/detect-row-hover-in-ignition-perspective/98892/8 "2024-11-21T17:48:17Z")

</div>

When Hovering on different rows, I want to show the row number in the tool tip.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 22, 2024, 8:13am UTC](https://forum.inductiveautomation.com/t/detect-row-hover-in-ignition-perspective/98892/9 "2024-11-22T08:13:42Z")

</div>

Add this too your stylesheet and see if you cant work with something this

(adding in a perspective class should be done too ofc if you dont want this to be on every table)

```python
.ia_table__rowGroup:hover::after {
  content: attr(data-row-id);
  padding: 5px;
  display: block;
  position: absolute;
  width: fit-content;
  text-align: center;
  background-color: black;
  color: white;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  -ms-border-radius: 2px;
  border-radius: 2px;   
}

```

if this isnt sufficient, i guess you'll need js to do something similar. Because you do not want to grab the id, return it to perspective just for it to wait to update the tooltip. You will have to make the tooltip yourself in js

---

<div class="post-metadata">

**Author:** ![Farhan\_Basheer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/farhan_basheer/32/66759_2.png) [@Farhan\_Basheer](https://forum.inductiveautomation.com/u/Farhan_Basheer)\
**Post date:** [November 23, 2024, 7:54am UTC](https://forum.inductiveautomation.com/t/detect-row-hover-in-ignition-perspective/98892/10 "2024-11-23T07:54:09Z")

</div>

I'll try. Thanks for the update!
