0

I need to disable the 'hover' functionality of one of the related list hover links. It just needs to go to the related list tab/section when clicked. It shouldn't have the hover functionality. Can we do this ?

1
  • Use timeout function setTimeout(function() { your_func(); }, 5000); to call your method to disable link. Sep 18, 2016 at 11:58

2 Answers 2

0

You can disable hover functionality on related list but not only the hover by keeping related list links on the top of detail page. This can be done from setup->user interface settings.

Other solution could be overriding the page with custom page and including detail page in it. Then having some javascript to disable hover events on links.

3
  • Yes I am familiar with that approach. But the problem is the hover links are the last ones to get loaded in my page, that's making it difficult for me catch them in javascript.
    – Lalitha A
    Sep 18, 2016 at 7:35
  • Is is loading after document ready? Sep 18, 2016 at 8:09
  • Yes. I tried printing it using window.load as well. But no luck.
    – Lalitha A
    Sep 18, 2016 at 8:25
0

If you are having trouble waiting the required amount of time before the hover links show up, you should try arrive.js.

It uses a selector descriptor to wait for a specific DOM element to show up and then executes your function.

Example:

document.arrive(".relatedList", function() {
  //'this' is the item that just 'arrived'
  //like the result of any selector, it could be an element list.
  this.onmouseover = null;
});

The github lib is here:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .