jquery-splitFlap icon indicating copy to clipboard operation
jquery-splitFlap copied to clipboard

Question about text update without animation

Open vincenzodesanctis opened this issue 7 years ago • 1 comments

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)

vincenzodesanctis avatar Apr 12 '17 19:04 vincenzodesanctis

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?

vincenzodesanctis avatar Apr 12 '17 19:04 vincenzodesanctis