I am writing my first function in the functions.php file in my child theme and am running into problems getting it to work. I keep getting an error that seems to be syntax related, like WP doesn't want to see "var". I am also not clear how to run the function either, being a very basic programmer.
Here is the code I got working in JSfiddle that I am trying to use in WP:
function adjustLogoHeight() {
var divHeight = $('#et-top-navigation').height();
$('.logo_container').css('height', divHeight+'px');
};
adjustLogoHeight();
If you have a solution that I can try, I would really appreciate it. Thanks in advance.