How to use the @pluginjs/dom.text function in @pluginjs/dom

To help you get started, we’ve selected a few @pluginjs/dom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pluginjs / pluginjs / modules / animate-text / src / effects / typewrite.js View on Github external
initialize() {
    this.text = text(this.element)

    this.build()

    this.textArr = this.text.split('')
    this.chunk = Array(this.textArr.length + 1)
      .fill(1)
      .map((v, k) => k)

    this.chunkReverse = this.chunk.slice().reverse()

    this.initTextOptions()
  }
github pluginjs / pluginjs / modules / animate-text / src / effects / fade.js View on Github external
initialize() {
    this.text = text(this.element)
    text('', this.element)
    this.instance.splitWord(this.text)
  }
github pluginjs / pluginjs / modules / animate-text / src / effects / typewrite.js View on Github external
build() {
    text('', this.element)

    this.content = document.createElement('span')
    addClass(this.instance.classes.WORD, this.content)
    text(this.text, this.content)
    append(this.content, this.element)

    this.cursor = document.createElement('span')
    addClass(this.instance.classes.CURSOR, this.cursor)
    text('|', this.cursor)
    append(this.cursor, this.element)
  }
github pluginjs / pluginjs / modules / animate-text / src / effects / typewrite.js View on Github external
update: () => {
        const content = this.totalText[count].textArr
          .slice(0, this.totalText[count].chunkReverse[endTarget.textLen])
          .join('')
        text(`${content}`, this.content)
      },
      complete: () => {
github pluginjs / pluginjs / modules / animate-text / src / effects / bounce.js View on Github external
initialize() {
    this.text = text(this.element)
    text('', this.element)
    this.instance.splitWord(this.text)
  }
github pluginjs / pluginjs / modules / animate-text / src / effects / bounce.js View on Github external
initialize() {
    this.text = text(this.element)
    text('', this.element)
    this.instance.splitWord(this.text)
  }
github pluginjs / pluginjs / modules / animate-text / src / effects / typewrite.js View on Github external
build() {
    text('', this.element)

    this.content = document.createElement('span')
    addClass(this.instance.classes.WORD, this.content)
    text(this.text, this.content)
    append(this.content, this.element)

    this.cursor = document.createElement('span')
    addClass(this.instance.classes.CURSOR, this.cursor)
    text('|', this.cursor)
    append(this.cursor, this.element)
  }
github pluginjs / pluginjs / modules / animate-text / src / effects / fade.js View on Github external
initialize() {
    this.text = text(this.element)
    text('', this.element)
    this.instance.splitWord(this.text)
  }
github pluginjs / pluginjs / modules / animate-text / src / effects / typewrite.js View on Github external
build() {
    text('', this.element)

    this.content = document.createElement('span')
    addClass(this.instance.classes.WORD, this.content)
    text(this.text, this.content)
    append(this.content, this.element)

    this.cursor = document.createElement('span')
    addClass(this.instance.classes.CURSOR, this.cursor)
    text('|', this.cursor)
    append(this.cursor, this.element)
  }