• Someone please help me get my jquery to work. I have been trying to test it with a simple jquery file to make the display of my wrapper div set to none but it’s not working. Here is the code I have in the functions file.

    <?php
    	// Load jQuery
    	wp_enqueue_script( 'jquery');    }
    ?>

    Here’s what I have in my js file to change the display of the wrapper.

    JQuery(document).ready(function($){
    	$("#wrapper").css('display','none');							  	    });

    Amd this is how I’m linking to the js file which is called lightbox.

    <script src="<?php bloginfo('template_url');?>/Scripts/lightbox.js"></script>

Viewing 1 replies (of 1 total)
  • Why aren’t you enqueueing the lightbox.js script in the functions.php file as well? The lightbox.js script may be loading before jQuery.

Viewing 1 replies (of 1 total)

The topic ‘Can't Get Jquery to work’ is closed to new replies.