Skip to main content

Lightning tooltip on mousehover

Lightning tooltip on mousehover

In component file:


<aura:component >

   <aura:attribute name="tooltip" type="boolean" default="false" />

    <div style="padding-left:2rem;padding-top:5rem;position:relative">

        <a href="" aria-describedby="help" onmouseover="{!c.showToolTip}" onmouseout="{!c.HideToolTip}">Help Text</a>

        <aura:if isTrue="{!v.tooltip}" >

            <div class="slds-popover slds-popover_tooltip slds-nubbin_bottom-left" role="tooltip" id="help" style="position:absolute;top:-4px;left:35px">

                <div class="slds-popover__body">Show ToolTip.</div>

            </div>

        </aura:if>

    </div>

</aura:component>

In controller js file

({

 showToolTip : function(c, e, h) {

        c.set("v.tooltip" , true);

    },

HideToolTip : function(c,e,h){

        c.set("v.tooltip" , false);

    }

})

 

Source: https://developer.salesforce.com/forums/?id=9062I000000XkcKQAS

Comments

Popular posts from this blog

Sample VS code setting

  When you are a software developer, you need to configure your IDE working with most convinience for your working, bellow is a sample code snippet to config your IDE {   "diffEditor.ignoreTrimWhitespace" : false ,   "javascript.updateImportsOnFileMove.enabled" : "always" ,   "[typescriptreact]" : {       "editor.defaultFormatter" : "esbenp.prettier-vscode"   },   "editor.formatOnPaste" : true ,   "workbench.settings.applyToAllProfiles" : [],   "editor.tabSize" : 2 ,   "redhat.telemetry.enabled" : true ,   "editor.codeActionsOnSave" : {       },   // "editor.codeActionsOnSave": {   //   "source.fixAll": "explicit",   //   "source.fixAll.eslint": "explicit",   //   "source.organizeImports": "explicit",   //   "source.sortMembers": "explicit",   //   "javascript.showUnused": "...

Docker Compose: Node.js Express and MongoDB example

  Docker   provides lightweight containers to run services in isolation from our infrastructure so we can deliver software quickly. In this tutorial, I will show you how to dockerize Nodejs Express and MongoDB example using   Docker Compose .