+ Start a Discussion
Yamini BathulaYamini Bathula 

Visualforce Page Hover

Hi Guys,

I have visualforce page with Custom Components in it. My requirement now is to display a hover text on a custom field(with other Custom Text Field) in each component individually. Can any one let me know if this is achievable? If Yes, does that work in Lightning version? 
sukanya banekarsukanya banekar
Hi Yamini,

You can write javascript to show text on hovinring custom field
<apex:page>
  <apex:inputText  id="cusField" onMouseOver="showText('Some Text')" onMouseOut="hide();"/>
  <div id="text"></div>
  <script>
  function showText(text){
        document.getElementById("text").innerHTML=text;
    }
    function hide(){
        document.getElementById("text").innerHTML="";
    }
  </script>
</apex:page>
Let me know if this helps.

Thanks,
Sukanya Banekar


 
Sneha Shende 19Sneha Shende 19
Hello 
Please refer this
<apex:page>
  <apex:inputText id="cusField" onMouseOver="showText('Some tesText')" onMouseOut="hide();"/>
  <div id="tesText"></div>
  <script>
  function showText(tesText){
        document.getElementById("tesText").innerHTML=tesText;
    }
    function hide(){
        document.getElementById("tesText").innerHTML="";
    }
  </script>
</apex:page>