jdan / dynamo.js

Cycles through bits of text in place
http://jdan.github.io/dynamo.js/
MIT License
626 stars 65 forks source link

Usability and Implementation #1

Closed jdan closed 11 years ago

jdan commented 12 years ago

When designing dynamo.js, I was torn on how one would use it on their website. Many libraries require you to something along the lines of $('#title).dynamo({ words: ['awesome', 'great', 'neat', 'cool'] }); etc, but it seemed like having such setup would be customizable, but annoying. In the end, I decided to abuse data attributes in the tag, and simply call .dynamo() on elements you want to scroll.

Some other setup ideas I had were to manually enter options inside of the divs you want to cycle, perhaps lis? I'm brand new to jQuery plugins so my apologies if this behavior is not normal.

If someone finds better setup options, such as

feel free to submit a pull request.

jdan commented 11 years ago

Closing for now. In the future I might implement something that allows you to define properties with data attributes, or with arguments to .dynamo().