>我的jQuery移动版1.4.0中有一个可折叠集,我想在这里像动画一样扩展时为这个可折叠集添加一个自定义动画
我在JSFiddle的可折叠集
我使用以下样式对可折叠对象进行动画处理,但它没有给我相同的结果。如何将此向下/向上滑动动画应用于我的可折叠对象展开?
请帮助我..
.ui-collapsible-content {
-webkit-transition: all 1s;
-moz-transition: all 1s;
-ms-transition: all 1s;
-o-transition: all 1s;
transition: all 1s;
height: 2em;
overflow: hidden;
}
.ui-collapsible-content-collapsed {
display: block;
height: 0;
padding: 0 16px;
}
这是我的代码
$("[data-role='collapsible']").collapsible({
collapse: function( event, ui ) {
$(this).children().next().slideUp(150);
},
expand: function( event, ui ) {
$(this).children().next().hide();
$(this).children().next().slideDown(150);
}
});
此代码使用 jquery mobile 1.4.0 进行了测试。谢谢。