Open
Description
It would be great if we could initialize powertip across multiple tooltips, but have their placement determined by an HTML data attribute.
Is there a way currently I can implement this? I tried using the powerTipPreRender event, but that only allows me to modify the element the tip is tied to.
Ex:
<span class="tooltips" data-powertiptarget="myToolTipNE" data-powertipPosition="ne">Northeast positioning</span>
<span class="tooltips" data-powertiptarget="myToolTipS" data-powertipPosition="s">South positioning</span>
Metadata
Metadata
Assignees
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
andrewhinde commentedon Aug 10, 2018
It's a bit of a hack, and doesn't easily allow for extending options, but I was able to implement this sort of thing by doing this:
stevenbenner commentedon Sep 23, 2018
This request does have merit. But since options are shared across a PowerTip instance (a single
.powerTip()
call), it would require some extra logic that would group elements with the same options then do a separate init for each group.Also, it would probably be more extensible if the data attribute was a generic "options" that would accept a JSON object. For example:
I'll think about it. If it's easy and doesn't add a lot of code then I'll accept it as a feature request for a future release.