Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assigning multiple values, or an array to the flapper #10

Closed
jantsdesign opened this issue Dec 22, 2014 · 0 comments
Closed

Assigning multiple values, or an array to the flapper #10

jantsdesign opened this issue Dec 22, 2014 · 0 comments

Comments

@jantsdesign
Copy link

I have the code below which has 2 fields, a year with 4 characters and a position with 2 characters.
It's working so far and currently 'flaps' to show 2014 02 then clears the letters and then re-flaps to show 2014 02.

How would you go about assigning multiple values to this script so I could 'flap' from 2014 02 to 2013 01 to 2012 04 etc...

var $demos = $('#animation_demo input');
setTimeout(function(){
$year.val('2014').change();
$position.val('02').change();
var toggle = true;
setInterval(function(){
if (toggle) {
$year.val('2014').change();
$position.val('02').change();
}
else {
$year.val('').change();
$position.val('').change();
}
toggle = !toggle;
}, 3000);

            }, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants