-
Notifications
You must be signed in to change notification settings - Fork 757
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
Its not issue its question) #105
Comments
hey @gonardfreeman, right now I don't believe textillate makes this easy and would probably rely on a proper reset / destroy method (#80). The cleanest way may be to create a new textillate for the new texts and remove (or manually fade out) the old textillate element. If you do get this working please post back here for other users to benefit from. I'm also happy to accept any PRs that would make this easier. Good luck! |
also, thanks for responding to other issues... I don't have much free time at the moment so they've been piling up. |
@jschr no problem) |
Awesome, glad to hear it! |
Works fine for me, except passing options to out animation, but I'm make data-out-animation and all works fine. I've got question, if I'm getting text from getJSON and I'm need to refresh that texts, how can I use your plugin to remove old text, and then animate new?
Here some of my code, below
$.getJSON(url+count) .done(function(data){ $('#text').text($(data[0]['content']).text().toUpperCase()).textillate({ in:{ effect: 'fadeInLeft', callback: function(){ console.log('animate in'); } }, }); $('#title').text(data[0]['title']).textillate('start'); }) .fail(function(){ console.log('ERROR'); });
$.getJSON(url+count) .done(function(data){ $('#text').text($(data[0]['content']).text().toUpperCase()).textillate({ in:{ effect: 'fadeInLeft', callback: function(){ console.log('animate in'); } }, }); $('#title').text(data[0]['title']).textillate('start'); }) .fail(function(){ console.log('ERROR'); }); $('#new_click').on('click',function(e){ $('#text').textillate('out'); $('#title').textillate('out'); e.preventDefault(); count++; $('#text').on('outAnimationEnd.tlt', function(){ //$('#text').empty(); $.getJSON(url+count) .done(function(data){ $('#text').text($(data[0]['content']).text().toUpperCase()).textillate('in'); $('#title').text(data[0]['title']).textillate('start'); }) .fail(function(){ console.log('ERROR'); }); }); });
The text was updated successfully, but these errors were encountered: