Pixastic - jQuery 插件不起作用?
我对名为 Pixastic 的 jQuery 插件有疑问。我让它作为独立库工作,但我不能将它与 jQuery 一起使用,因为它不起作用,我使用了文档中的代码,但由于某种原因仍然无法让它工作。
我遵循的文档: http://www.pixastic.com/lib/docs/#jquery< /a>
HTML(我无法放置完整的 HTML 页面,因为它不会在此处显示?bug?,但只是为了让您确定我包含了所有内容)
<script src="jquery-1.6.1.min.js" type="text/javascript"></script>
<script src="pixastic.full.js" type="text/javascript"></script>
<script src="f.js" type="text/javascript"></script>
<img id="image" src="014.jpg" />
JS (f.js)
$(document).ready(function()
{
/*
Pixastic.process(document.getElementById("image"), "blurfast",
{
amount : 3
});
*/
Pixastic.process(document.getElementById("image"), "desaturate"); // - Works
//$("#image").pixastic("desaturate"); // - Not so much...
});
I have a problem with jQuery plugin called Pixastic. I got it working as standalone library, but I cannot use it with jQuery because it does not work, I used code from documentation and still can't get it to work for some reason.
Documentation that I followed: http://www.pixastic.com/lib/docs/#jquery
HTML (I cannot put full HTML page since it won't show it here ?bug?, but just so you are sure that I am including everything allright)
<script src="jquery-1.6.1.min.js" type="text/javascript"></script>
<script src="pixastic.full.js" type="text/javascript"></script>
<script src="f.js" type="text/javascript"></script>
<img id="image" src="014.jpg" />
JS (f.js)
$(document).ready(function()
{
/*
Pixastic.process(document.getElementById("image"), "blurfast",
{
amount : 3
});
*/
Pixastic.process(document.getElementById("image"), "desaturate"); // - Works
//$("#image").pixastic("desaturate"); // - Not so much...
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从您链接到的文档中:
您可能需要使用
$(window).load()
而不是$(document).ready()
。$("#image").load()
可能是一个更好的主意。From the documentation you linked to:
It's likely that you need to use
$(window).load()
rather than$(document).ready()
.$("#image").load()
might be an even better idea.