Give help. Get help.
So i want to make when you hover over the #prvi div the #main changes it’s background color.
I tried something like this:
But that doesn’t work. Here is the[ codepen](http://codepen.io/markomarkogame/pen/DyIvo “codepen”).
What you need is a parent selector, which doesn’t exist yet. You can do it with jQuery though.
So it was done in jQuery [here](http://www.codeschool.com/ “here”) ? (the Paths sections)
Since I’m no good in jQuery i might as well give up on this ..
Yes, on that site they use JS (didn’t check if it is jQuery, but probably it is) to add classes like `path-ruby` to the container.
Here is how it can be done using jQuery: http://codepen.io/CrocoDillon/pen/tqEfh
@Krish1980, you’re removing all other classes from the parent div like `.parent`. That’s why I like jQuery so much, functions like `addClass` and `removeClass` automatically keep the other classes :)
Wow cool stuff guys.
@CrocoDillon nice fade in and out I was wondering where could i learn to do something like this, looks simple.
Anyone ? Any link to point me how to do this kind of stuff, nothing complicated ?
You must be logged in to reply to this topic.