Problem: when using "use strict", this Word Rotator code works, but incorrectly, flickering appears, incomprehensible transparency, how can you resolve this issue?

var ut_word_rotator = function() { var ut_rotator_words = [ 'Text 1', 'Text 2', 'Text 3' ] , counter = 0; setInterval(function() { $(".hero-title").fadeOut(function(){ $(this).html(ut_rotator_words[counter=(counter+1)%ut_rotator_words.length]).fadeIn(); }); }, 3000 ); } ut_word_rotator(); 

    1 answer 1

    No idea what a word rotator, but show a more lively example. And in fadeOut (), the duration of the animation is always the first, and then callback.

    • can be an example? - vladislav_zp
    • what are you talking about? I do not understand. - DimenSi