Open sta1r opened 11 years ago
Hi
I'm trying to use a DOM object as a selector when initializing Caman, i.e.
Caman($img, function () {});
instead of
Caman('#image-id', function () {});
With the object, I get the following console error:
Uncaught TypeError: Cannot call method 'toLowerCase' of undefined
Here's a bigger snippet of code for info:
$('.projects-cluster li').hover( function() { $img = $(this).find('img'); Caman($img, function () { this.greyscale(); this.exposure(30); this.colorize('#FF8080', 50); this.render(); }); }
Thanks
$img gives you a jQuery object by default. I think you may need to extract the DOM object out of it like this:
$img
Caman($img[0], function () {
Hope that helps!
Hi
I'm trying to use a DOM object as a selector when initializing Caman, i.e.
instead of
With the object, I get the following console error:
Here's a bigger snippet of code for info:
Thanks