I am trying to create an image_tag and specify a data attribute that does not have any value set for it. I'm trying to add a data tooltip for use with Foundation 5. Tooltips. It seems that if any value is really set to this, Foundation uses the same tooltip text each time and ignores the title attribute of this element (so each tooltip will say, that the first one you depended on was ... which seems to be a mistake both on its own and on part of the Fund)
This is what I need to generate:
<img src="[whatever]" title="My Tooltip" data-tooltip />
This will not work for me:
<img src="[whatever]" title="My Tooltip" data-tooltip="[insert anything here]" />
I tried several different combinations and read the documentation, but it seems that whatever I select the value, it calls it as data-tooltip = "null" or true or false or any line that I pass.
image_tag(my_image, class: 'has-tip', title: "My Title Here", data: { tooltip: true })
source
share