krisk / textualizer

A jQuery plug-in which transitions through blurbs of text, animating each character
http://krisk.github.io/textualizer/
341 stars 40 forks source link

Pass an array into the 'list' #17

Closed srhise closed 12 years ago

srhise commented 12 years ago

Pardon my question if it seems straightforward, but I've populated an array of strings (no keys) and I would like to pass that in as the list. How would I accomplish that?

krisk commented 12 years ago

Pardon the late reply. You would achieve the above like this:

// Your array:
var list = ['item 1', 'item 2', 'item 3'];

// Get the DOM target you intend to put the textualizer in
var txtlizer = $('#container');

// Pass in the array to the textualizer instance
txtlizer.textualizer(list);

// Start
txtlizer.textualizer('start'); 

Hope this helps.

Let me know if you have any other questions.