Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 路径插件代码不';无法正确设置贝塞尔动画_Jquery_Animation_Jquery Plugins - Fatal编程技术网

Jquery 路径插件代码不';无法正确设置贝塞尔动画

Jquery 路径插件代码不';无法正确设置贝塞尔动画,jquery,animation,jquery-plugins,Jquery,Animation,Jquery Plugins,这段代码直接来自jQuery.Path插件,只是在我给我的标记一个id“my_elem”后,我在选择器前面添加了一个散列,因为它不工作 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="path.aspx.cs" Inherits="path" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or

这段代码直接来自jQuery.Path插件,只是在我给我的标记一个id“my_elem”后,我在选择器前面添加了一个散列,因为它不工作

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="path.aspx.cs" Inherits="path"     %>
<!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 runat="server">
<script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="scripts/jquery.path.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function() {
        var bezier_params = {
            start: {
                x: 185,
                y: 185,
                angle: 10
            },
            end: {
                x: 540,
                y: 110,
                angle: -10,
                length: 0.25
            }
        };
        $("#my_elem").animate({ path: new $.path.bezier(bezier_params) }, 1000);
    });
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
    <img id="my_elem" src="images/image.jpg" />
</div>
</form>
</body>
</html>

$(文档).ready(函数(){
变量bezier_参数={
开始:{
x:185,
y:185,
角度:10
},
完:{
x:540,
y:110,
角度:-10,
长度:0.25
}
};
$(“#我的元素”).animate({path:new$.path.bezier(bezier_params)},1000);
});
它一点作用也没有。我的小50x50 jpg装载并坐在那里。我应该期待它移动吗?我错过了什么?我已经包括了jquery-1.3.2.min.js和jquery.path.js以及上面的代码


编辑添加了完整的页面代码。

对于那些焦急等待修复的人来说,我想说的是我错过了相对定位,但实际上从未在任何地方提到过。我回顾了到处展示的样品的来源,这让我感到震惊

<img id="my_elem" src="images/image.jpg" style="position: relative;" />

FYI:我也添加了参数1000,但有或没有都不起作用。