点击链接时如何才能有一个州的动画?

时间:2012-11-22 16:28:31

标签: animation jquery-plugins click hyperlink

我发现这个很酷的插件sweet menu,当我点击链接时,我无法停止缓动动画动画。我希望有一个'downstate',例如,当我点击家庭动画,我想看动画(很像鼠标悬停功能(但没有回到mouseleave。我希望有人可以帮助我因为我我是所有这些代码的新手,我开始走向坚果:)提前感谢您的帮助!

这是脚本:

<script type="text/javascript" src="Widgets/sweetMenu/jquery.easing.js"></script>
<script type="text/javascript" src="Widgets/sweetMenu/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="Widgets/sweetMenu/jquery.sweet-menu-1.0.js"></script>
<script type="text/javascript" src="Widgets/sweetMenu/jquery.sweet-menu-min-1.0.js"></script>
<script type="text/javascript"> 

$(document).ready(function(){ 

$('#exampleMenu').sweetMenu({
    top: 200,
    padding: 8,
    iconSize: 48,
    easing: 'easeOutBounce',
    duration: 500,
    icons: [
    'widgets/sweetmenu/images/home.png',
    'widgets/sweetmenu/images/comments.png',
    'widgets/sweetmenu/images/red_heart.png',
    'widgets/sweetmenu/images/male_user.png',
    'widgets/sweetmenu/images/yellow_mail.png',
    'widgets/sweetmenu/images/computer.png'
                ]   
    });
    });
</script>

这是css:

 .sweetMenuAnchor{
border-top: 1px solid #ffffff;
border-right: 1px solid #ffffff;
border-bottom: 1px solid #ffffff;
border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
border-bottom-right-radius: 4px;
-moz-border-radius-bottomright: 4px;
color: #0071bb;
font-size: 24px;
font-weight: bold;
text-align: right;
text-transform: uppercase;
font-family: Arial, Helvetica, sans-serif;
text-decoration: none;
background-color: #888888;
opacity: 0.6;
visibility: visible;
z-index: 999999;
        }

        .sweetMenuAnchor span{
display: block;
padding-top: 10px;
        }


        h1
        {
            display: block;
            text-align: center;
            font-size: 48px;
            color: #ffffff;
            text-shadow: 0px 0px 12px #000000;
            font-family: "Trebuchet MS";
        }

最后是HTML:

<ul id="exampleMenu">
        <li><a href="#">Home</a></li>
        <li><a href="#">Blog</a></li>
        <li><a href="#home">portfolio</a></li>
        <li><a href="#home">Hire Me</a></li>
        <li><a href="#home">Contact</a></li>
        <li><a href="#home">My Apps</a></li>
  </strike>

0 个答案:

没有答案