Jquery 手风琴缓动
我试图让我的下拉式手风琴有更好的感觉...但这对我来说没有发生...有什么想法吗?
这是我在手风琴本身的代码......
<div id="accordion">
<h3 id="branding"><a href="#">Branding</a></h3>
<div>Lorem Ipsum is simply dummy text</div>
<h3 id="website"><a href="#">Website</a></h3>
<div>Lorem Ipsum is simply dummy text</div>
</div>
以及在头部......
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.accordion.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#accordion').accordion({ navigation: true, easing: 'easeInBack' });
});
</script>
I am trying to get a nicer feel to my drop down accordion...but it isnt happening for me...any ideas?
Here is my code in the accordion itself...
<div id="accordion">
<h3 id="branding"><a href="#">Branding</a></h3>
<div>Lorem Ipsum is simply dummy text</div>
<h3 id="website"><a href="#">Website</a></h3>
<div>Lorem Ipsum is simply dummy text</div>
</div>
And in the head...
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.accordion.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#accordion').accordion({ navigation: true, easing: 'easeInBack' });
});
</script>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
接受的答案似乎不再有效。
这:
现在已更改为动画:
解决方案:
The accepted answer doesn't seem to work anymore.
This:
now has changed to animate:
Solution:
我一直使用“动画”属性来执行此操作,而不是缓动插件。例如:
也许可以尝试一下。
尽管我已经意识到这无论如何都使用了缓动插件!
因此,我做了一些研究,并在此文档中找到了一条评论解释如何定义您自己的基于缓动的动画。因此,要做你想做的事,你可以使用以下内容:
I've always used the 'animated' property to do this, rather than the easing plugin. e.g.:
Perhaps give that a try.
Although I've realised that this uses the easing plugin anyway!
So I did a bit of research and found a comment in this document which explains how to define your own easing-based animations. So, to do what you want, you could use the following: