I have a component
<div class="tooltip" onmouseover="{!c.hover}"> <div > <div > Test Test Test </div> </div> <div aura:id="textId" class="tooltiptext"> <div>Test Code</div> </div> </div> </aura:component>
Css applied is
.THIS.tooltip {
position: relative;
display: inline-block;
}
.THIS .tooltiptext {
visibility: hidden;
position: absolute;
word-wrap:break-word;
text-align: justify;
}
.THIS.tooltip:hover .tooltiptext {
visibility: visible;
}
now in controller i want to use
hover :(component){ component.find("textId").getElements(); }
error i am getting is
[component.find(...).getElements is not a function]
this error occurs if locker service is enabled.
Is there any way to use component.find("").getElements() on div which is hidden?
textId
,tooltiptext
? Can you please make your question bit more clearer?hover :function(component){ var divs = component.find("textId").getElements(); console.log(divs)}