NUKnightLab/soundcite

style <a> tags in addition to (instead of?) <span>

Closed this issue · 3 comments

jywsn commented

Shouldn't matter, since element selection is done by class only.

jywsn commented

Confirmed that soundcite correctly styles anchor tags, although there is ambiguity about what happens when you click on the element if the anchor has an href attribute. Right now, the sound will start playing but then the page navigates away to the link target. If there is no href, then there is no problem.

I suppose someone might be intending to use an tag with an href to support the case when there's no javascript. In that case, using event.preventDefault should address the issue.