Skip to content

Highlight feature only working on seemingly random parts of strings? #23

@notch16

Description

@notch16

Hi,

I'm using Typer for the first time in a project and have set it to type out an array of 4 different strings. Currently it prints them out in order, keeping each one there for a little while it is being highlighted. Then the current string disappears and the next one in the array is printed and highlighted.

The issue I'm having (and this may have something to do with being new to Typer) is that when each string is highlighted sometimes only a certain part (or the start or end) of the string is highlighted before the string disappears and the next one in the array is typed out.

Here's the code from the HTML with the array of strings that are typed out:

<div class="small-text" data-typer-targets='{ "targets" : ["specialized in brand experience.","BORN INTO CREATIVITY.","FOCUSED ON STRATEGY.","INSPIRED BY TECHNOLOGY."]}' >specialized in brand experience.</div>

Here are my current options from jquery.typer.js:

options = {
  highlightSpeed    : 20,
  typeSpeed         : 100,
  clearDelay        : 500,
  typeDelay         : 200,
  clearOnHighlight  : true,
  typerDataAttr     : 'data-typer-targets',
  typerInterval     : 2000
},

Thanks in advance for any information or guidance. It is much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions