jdan / dynamo.js

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

Another Possibility. #22

Closed ctf0 closed 9 years ago

ctf0 commented 9 years ago

hey there ,first thanx for the ridiculously cool plugin.

i wanted to ask is it possible for the plugin to work on a dynamic data ,like changing the language of the page ,so instead of the whole page being reloaded ,the words/letters that needs changing will be changed through the plugin ,am basically after the flipping affect.

,i also posted a question similar to this on SOF Here but unfortunately so far no answers.

jdan commented 9 years ago

It is! You'd have to put in a lot of effort though.

Essentially, for every word on the page, you'll have to get its translation. Then wrap the original word in something like <span class="swap" data-lines="fromage">cheese</span>. Then just call $('.swap').dynamo_trigger().

Does that make sense?

ctf0 commented 9 years ago

i know you already answered that but i have an idea and hopefully it would sound good

what if we made a function that takes 2 arguments
and now we bind this function to a button which on click ,the plugin will then do the following

and now basically each time we click on that button the plugin will just swap between the new & old data while doing its magic.

with the big text we can make the script even run through server so the user wont feel any lag or down time .

jdan commented 9 years ago

That could work. I would not build something like that into dynamo, though. Seems like code you would run on top of it.

ctf0 commented 9 years ago

is there a chance you could do something like that to anew branch ??? i know it will require a lot a work but sadly :( i have so little knowledge to js to do something like that ,if you know maybe some tutorial i could check that would help with that plz direct me.

jdan commented 9 years ago

Unfortunately I can't, but if you give it a shot and run into trouble I'm always happy to help.

ctf0 commented 9 years ago

fair enough ,well do ,thanx again.