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 ?
2 Answers
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.
-
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. Commented Sep 18, 2016 at 7:35
-
-
Yes. I tried printing it using window.load as well. But no luck. Commented Sep 18, 2016 at 8:25
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:
timeout function setTimeout(function() { your_func(); }, 5000);
to call your method to disable link.