Animation in angular js slide animation of div?

老子叫甜甜 提交于 2020-01-06 19:53:30

问题


Can you please tell me how we slide div when user click tab .I make demo in jQuery Mobile (fiddle http://jsfiddle.net/ezanker/o9foej5L/1/ ) in which I have three tab and using the tab it show transition can you please tell me how we can do same in angular ? I am trying to achieve this but I am not able to do that how I ail achieve this in angular?

Plunker http://plnkr.co/edit/ornYCV15uV8lPNL1ujPL?p=preview

 $(function(){
        $("#owl-demo").owlCarousel({
            navigation : false, // Show next and prev buttons
            pagination : false, //hide pagination dots
            slideSpeed : 300,
            paginationSpeed : 400,
            singleItem:true,
            afterMove: function(){
                var owl = $("#owl-demo").data('owlCarousel');
                $(".tabBtn").removeClass("ui-btn-active").eq(owl.currentItem).addClass("ui-btn-active");
            }
        });
    })

回答1:


After a long RND .I am able to solve that problem own .I make a directive like that than using that directive I animate the div Here is demo http://plnkr.co/edit/M08sP4oEZLWr6HgGKAde?p=preview

app.directive('owlCarousel', function() {
  return {
    restrict: 'A',
    scope: {
      owlOption: '='
    },
    link: function(scope, element, attrs) {
      $(element).owlCarousel(scope.owlOption);
    }
  };
});


来源:https://stackoverflow.com/questions/25669892/animation-in-angular-js-slide-animation-of-div

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!