Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
The jQuery would be:
jQuery("#logo img").hover(
function($) {
$(this).fadeTo("slow", 0.33);
},
function($) {
$(this).fadeTo("slow", 1);
}
);
See http://codex.wordpress.org/Using_Javascript
and
http://codex.wordpress.org/Function_Reference/wp_enqueue_script
You’d need to enqueue it.
Where do I add that jQuery code to?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Contact your theme’s vendors. We have no access to commercial themes so we can’t tell you that.
You can do this with CSS. Add
#logo a:hover img {
opacity: 0.3;
}
If you want smoother animation, you can use CSS transitions.
Hey I’ve added that to my css in my header, and nothing changed 🙁
I tried to edit your CSS live in FireBug and it works. Maybe you are doing it wrong. Try to edit this rule to the theme’s custom.css file.
Okay great I got it to work. What code would I have to add to it to make it slide nice and easy?