I've been attempting to create a repeating animation with jQuery by using a while
loop where the condition is set to true
. However, it seems that this approach is not appreciated by the browser.
Is there a proper way to achieve this type of animation?
Check out my code snippet on jsFiddle here!
$('.test').click(function () {
while (true) {
$(this).hide(1000);
$(this).show(1000);
}
});