Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // prepare all the texts to split
- // wait for the fonts to load first
- document.fonts.ready.then(() => {
- const t = this.$target
- .find('.js-arts-split-text')
- .artsSplitText()
- .find('.arts-split-text__line')
- .filter(function () {
- const
- $this = $(this),
- display = $this.css('display');
- return display === 'inline-block' || display === 'inline-flex';
- });
- // split lines that became inline-block with a divider
- $(`<div class="w-100"></div>`).insertAfter(t);
- resolve(true);
- });
Add Comment
Please, Sign In to add comment