0

I have list that should animate the list when new card is coming and push the array to the left and insert new li to the ul.

The code in the angular directive is :

 setTimeout(function () {
                  $('.list').animate({scrollLeft: 90000}, 1500);

      $('#item' + scope.id).hide().animate({width:'toggle'},500, 'swing',
                  function() {
                    console.log( 'changing to visible: ');
                      $(".div_loader").css('visibility','visible').hide().fadeIn(300);
                  });
          }, 10);

The problem is when I click the button that enter the new li to the list ,the list is jump a little bit and then the loader is show up and the new li enter in nice fade in

How can I fix the jumping? maybe there is other way to do that animate with angular

thanks a lot

Scopi
  • 663
  • 1
  • 6
  • 21
  • Your code is not valid due to a missing delimiter. `$('#item.id)` -> `$('#item.id')` – lin Feb 14 '17 at 16:17
  • @lin updated the post – Scopi Feb 14 '17 at 16:18
  • You should not mix AngularJS with jQuery. Please take a look here: http://stackoverflow.com/questions/14994391/thinking-in-angularjs-if-i-have-a-jquery-background Could you create a fiddle or plnkr to reproduce your problem? – lin Feb 14 '17 at 16:22
  • @lin did not find way to do that in angualr -smth that push the list and keept the empty place with loader until the new item is ready – Scopi Feb 14 '17 at 16:35
  • Please create a working fiddle or plnkr to reproduce it. – lin Feb 14 '17 at 16:43

0 Answers0