Hi Guys,
I’m trying to run this jqery code in a code block:
<script>
jQuery( document ).ready(function() {
jQuery(“.image-overlay”).click(function() {
jQuery( “#header” ).hide();
});
jQuery(“.rfbwp-close”).click(function() {
jQuery( “#header” ).show();
});
});
</script>
It works when I pass it through the console on dev tools, but for some reason it’s not loading with the page. Could you help me out? Thanks!
Hey jesseaborden!
Please add following code to Functions.php file in Appearance > Editor
function avia_custom_logo_app(){
if(is_page(15644)){
?>
<script>
jQuery( document ).ready(function() {
jQuery(".image-overlay").click(function() {
jQuery( "#header").hide();
});
jQuery(".rfbwp-close").click(function() {
jQuery("#header").show();
});
});
</script>
<?php
}}
add_action('wp_footer', 'avia_custom_logo_app');
Best regards,
Yigit