I have the following HTML:
<a class="rounded" data-trigger="hover" data-toggle="popover"
data-html="true" data-placement="right" data-title="some data title"
data-content="some data content" href="#" onclick="return false;"
onmouseover="onMouseOver();" onmouseout="onMouseOut();">
<i class="fas fa-info-circle fa-sm" aria-hidden="true" style="color: var(--tint-color);"></i>
</a>
<script>
function onMouseOver() { console.log('onMouseOver') }
function onMouseOut() { console.log('onMouseOut') }
</script>
which I repeatedly call with different values of data-title
and data-content
. Is there a way to have a custom tag such as:
<popover data-title="some data title" data-content="some data content"></popover>
Is this the best method for achieving this, or is making a CSS class more suitable?