Tagged: :hover, children elements, jQuery
- This topic has 5 replies, 2 voices, and was last updated 5 years, 6 months ago by
Sebastian.
Author | Posts |
---|---|
widevisions
September 24, 2019 at 4:54 am
|
Heads up! this post was created when Microthemer was at version 5. The current version is 7. Some references to the interface may be out of date. Hi all, newbye here, inexperienced and quite a bad English speaker, so I hope you apologize if sometimes my sentences are not 100% clear, I will try my best. |
Sebastian
September 25, 2019 at 9:36 am
|
Hey, Sorry for the slow reply, it was my wedding anniversary yesterday. In answer to your questions: How do I set properties on a child of a parent hovered element using CSS, so when I hover the parent, the children change as expected, instead of the parent itself? Microthemer doesn’t suggest those kinds of selectors by default, so you will need to manually edit the selector code. The following type of selector will do what you need:
This will style all child elements a certain way when the parent is hovered over. I’m not sure I follow your second question. Would you mind clarifying please? Thanks, |
widevisions
September 25, 2019 at 9:49 am
|
Hi, no worries and my best wishes to you and your wife ๐ Lorenzo |
Sebastian
September 25, 2019 at 10:12 am
|
Hey Lorenzo, Thanks for the wishes! Yes, I think I understand you now. You’re right, MT only supports setting one transition value in response to an event via the transition property group. We will add the option to have multiple rows in future, which will make this a bit easier. But for now, your best option is to create a separate selector that taps into the class MT dynamically adds to elements (rather than having to add your own). The classes are as follows: inView: .mt-inview You can see these classes by inspecting elements using your browser dev tools. Or if you go to the custom code editor to the left of the Font property group (assuming you don’t have Sass support enabled – with Sass the code editor and GUI fields do not sync right now, but they will future). So you could create a separate selector similar to the one MT generates e.g.
That way you can use MT’s UI fields to add properties. Or, you can edit the custom code, manually inserting your custom properties (but again, only if you don’t have Sass support enabled). Does that make sense? Cheers, P.S. You can create regular hover selectors via the UI . Just not the special parent-child one you’re after. Also, there are two ways to create a custom selectors in MT. |
widevisions
September 25, 2019 at 11:14 am
|
Hi Sebastian, thanks really a lot. Lorenzo |
Sebastian
September 25, 2019 at 11:21 am
|
You’re welcome Lorenzo. Let me know if you need further assistance ๐ Cheers, |