I have been trying to make it so that when you hover over any part in the box then the box-hover (div) will fadein to opacity 0.7 so that it looks mostly black but little transparent.
But nothing I have done is working. And I don’t want to assign it with ID since there will be more boxes.
Here is the code I am trying to make: http://pastebin.com/3ZRcrx57
First of all, your
.box-hoverelement is a child, not a sibling, sonext()will not work, you will have to usefind()orchildren().Secondly, when writing javascript case does matter, and its
fadeInandfadeOut(notice capital letters)I think this is what you’re trying to do:
Here’s a DEMONSTRATION
You could even shorten that down to:
DEMO