开发者

Pulse effect with jQuery

I still cannot seem to get pulsing images to work with jQuery. This is code that apparently should work but does not.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>test</title>

</head>
<body>
<script src="jquery-1.4.2.js" type="text/javascript"></script>
<script src="jquery.pulse.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(function() {
jQuery('#waterloo').pulse({
    opacity: [0,1]
}, {
     duration: 100, // duration of EACH individual animation
     times: 3, // Will go three times through the pulse array [0,1]
     easing: 'linear', // easing function for each individual animation
     complete: function() {
         alert("开发者_运维百科I'm done pulsing!");
    }
});
</script>

<a href="#"><img src="waterloo.png" border="0" class="env" id="waterloo"/></a>
</body>
</html>

Both js files are in the same directory, so I do not know why it does not work.


Count the number of closing parenthesis and brackets compared to your opening-ones. You haven't closed the document.ready-statement.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜