By BaliuxXx on
Hello,
Searched and tried lots of stuff, but nothing found what I need. I need a simple ImageCache hover trick. If I had two presets, i.e. one in grey and one in color. I want when my mouse over the grey image, it becomes color. Tried Hover_Preview module, but it pops up other image (with other preset). All I need is simple hover :)
Any suggestions?
Thanks,
Donatas
Comments
I think it's better and easy
I think it's better and easy to do with CSS. Loading another image with same size but colors is not a good usage of ImageCache, I think.
and my CSS knowledge is "null"
What's new and changing in PHP 8.4
thanks for your reply, Ayesh.
thanks for your reply, Ayesh. There is a cool module called imagecache_actions, you can change colors, background and etc. for your image. It's impossible with css, because you don't know wich image to hover. I think I would need to write some js on my own to do this if there isn't yet. And I can't believe it isn't.
Thanks, Donatas
If somebody needs I wrote
If somebody needs I wrote simple code for this stuf.
Having two presets named 'imageSmall' and 'imageSmallHover', you can change these images with jquery
CSS workaround
Had the same issue myself. Searched around for a dedicated module, didn't really find anything to do the job. Just needed simple greyed out - full colour on hover. My worry with creating to presets was load time as it was designed for a gallery of 12 images, therefore straight away doubling to 24. my client was really fussy on load time. my solution was to:
the class i ended up with for reference was ".imagecache.imagecache-gallery_thumb.imagecache-default.imagecache-gallery_thumb_default"
not absolutely perfect, as it still has some colour in there by definition of just an opacity change, but did the job i was looking for. as a reference, you should be able to see how it works via this link:
http://www.thorneweddingphotography.co.uk/gallery
hope this helps
Great !
Thank a lot for that one !!!
Exactly what I was looking for !