jquery-splitFlap
jquery-splitFlap copied to clipboard
Question about text update without animation
First of all congratulation for your interesting jquery-slipFlap. The question is this: is there a easy way to update a text in the same row without re-animation? I mean, suppose to load a json object every few minutes, if the row (same line) has the same value comparing to the previous one than do not update and do not animate. How to achieve it?
example: old
JSON = {
"num":100,
"name":"test.com",
"messages":"msg"
}
action: animation....
new
JSON = {
"num":100,
"name":"test.com",
"messages":"msg"
}
action: no animation (leave the previuos one because equal to the previous one)
Maybe the trick is to pass the text directly to the textInit variable and put autoplay to false.
if json_old[first row] = json_new[first row] than
###do not update but leave the text whitout animation
$('.my-spliflap').splitFlap({textInit: 'text row'});
$('.my-spliflap').splitFlap({autoplay: false});
is it correct way?