Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Coffeescript nested iterations Re: Coffeescript nested iterations

#129384
TheDoc
Member

Aaaahhh. I see where we’re at now. Okay. This is much simpler than I thought.

CoffeeScript:

$(document).ready ->
$(‘.related_products_image’).mouseenter (e) ->
$(e.currentTarget).removeClass(‘dimmed’)
$(“.related_products_image”).mouseleave (e) ->
$(e.currentTarget).addClass(‘dimmed’)

CSS:

.related_products_image.dimmed {
opacity: 0.4;
}