Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1304023
    khomiko
    Participant

    I need to add this before the </header> and I’m not too sure how to do that. When I add the script in my header.php before the other header is called, it works just fine. If I put it after then it doesn’t work. How do I make this work on my site?

    <script src=”//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js”></script>
    <script type=”text/javascript”>
    $(window).load(function() {
    $(“.loader”).fadeOut(“slow”);
    })
    </script>

    #1304028
    Thai
    Moderator

    Hi There,

    Please add the following code under functions.php file locates in your child theme:

    add_action( 'wp_head', 'add_custom_script' );
    function add_custom_script(){
    	?>
    	<script type="text/javascript">
    		jQuery(window).load(function() {
    			jQuery(".loader").fadeOut("slow");
    		})
    	</script>
    	<?php
    }

    Hope it helps 🙂

    #1304037
    khomiko
    Participant

    Worked beautifully! THANK YOU 😀 Merry Christmas!

    #1304080
    Nabeel A
    Moderator

    Glad we could help.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1304023 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>