【发布时间】:2012-06-18 15:54:36
【问题描述】:
我有一组图像必须在加载时去饱和并在悬停时显示颜色。我已经尝试过了,但是悬停不起作用,但负载的饱和度降低了:
$(window).load(function () {
$(".box img").pixastic("desaturate");
$(".box img").mouseenter(function (e) {
var self = $(this);
Pixastic.revert(self); // make it colour
});
$(".box img").mouseleave(function (e) {
// make it black n white again
$(this).pixastic("desaturate");
});
});
我在这里看到了一些其他帖子,但似乎都没有。
我做错了什么?
【问题讨论】:
-
您似乎在
mouseenter()函数中使用了不同的大小写(Pixastic与pixastic) - 可能是这样吗?