Abbread - Spread ABBR titling

A title attribute of an abbr element is important, but writing title attribute with every abbr element is annoying. This small JavaScript library spreads first abbr element’s title attribute to other same abbr element(s).

Example

From:

<p>The <abbr title="Web Hypertext Application Technology Working Group">WHATWG
</abbr> has a small, invitation-only oversight committee called "Members", which
has the power to impeach the editor of the specifications.
Anyone can participate as a Contributor by joining the <abbr>WHATWG</abbr>
mailing list.</p>

To:

<p>The <abbr title="Web Hypertext Application Technology Working Group">WHATWG
</abbr> has a small, invitation-only oversight committee called "Members", which
has the power to impeach the editor of the specifications.
Anyone can participate as a Contributor by joining the <abbr title="Web
Hypertext Application Technology Working Group">WHATWG</abbr> mailing list.</p>

Usage

Put dist/abbread.js into head element of your HTML document.

<script defer src="/js/abbread.js"></script>

Don’t forget defer attribute!

Test

Elit voluptate FBB ad et duis ex qui voluptate eiusmod dolor non. Aliqua culpa duis aute occaecat tempor ad officia ad aute QQCG laborum deserunt esse. Adipisicing QQCG quis FBB exercitation sit sit labore anim laboris fugiat pariatur ullamco do FBB mollit irure consectetur. Irure non elit elit adipisicing nulla culpa officia et amet. Exercitation officia ipsum QQCG nisi velit pariatur.

License

MIT