div的角度js幻灯片动画中的动画? [英] Animation in angular js slide animation of div?
问题描述
你能告诉我当用户单击选项卡时我们如何滑动 div 吗.我在 jQuery Mobile 中制作了演示 (fiddle http://jsfiddle.net/ezanker/o9foej5L/1/ ),其中我有三个选项卡,并使用它显示转换的选项卡,您能告诉我我们如何在 angular 中做同样的事情吗?我正在努力实现这一目标,但我无法做到这一点,我是如何以角度实现这一目标的?
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");
}
});
})
推荐答案
经过长时间的 RND .我能够自己解决这个问题.这是演示http://plnkr.co/edit/M08sP4oEZLWr6HgGKAde?p=preview
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);
}
};
});
这篇关于div的角度js幻灯片动画中的动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!