Seems the scripts i enqued do not realize jquery is available?

Hello, I am using underscores.me I enqued these scripts

function agile_art_scripts() {
	wp_enqueue_style( 'agile_art-style', get_stylesheet_uri() );

	wp_enqueue_script( 'agile_art-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );

	wp_enqueue_script( 'agile_art-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
	
	wp_enqueue_script( 'agile_art-superfish', get_template_directory_uri() . '/js/superfish.min.js', array(), '20142311', true );
	
	wp_enqueue_script( 'agile_art-masonry', get_template_directory_uri() . '/js/masonry.pkgd.min.js', array(), '20142311', true );
		
	wp_enqueue_script( 'agile_art-masonry-settings', get_template_directory_uri() . '/js/masonryJsSettings.js', array(), '20142311', true );
	
	wp_enqueue_script( 'agile_art-cycle2', get_template_directory_uri() . '/js/jquery.cycle2.min.js', array(), '20142311', true );	
	
	wp_enqueue_script( 'agile_art-carousel-cycle2', get_template_directory_uri() . '/js/jquery.cycle2.carousel.min.js', array(), '20142311', true );	

	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
		wp_enqueue_script( 'comment-reply' );
	}
}
add_action( 'wp_enqueue_scripts', 'agile_art_scripts' );

but i get this error on the console

Uncaught ReferenceError: jQuery is not defined superfish.min.js?ver=20142311:10
Uncaught ReferenceError: $ is not defined masonryJsSettings.js?ver=20142311:1
Uncaught ReferenceError: jQuery is not defined jquery.cycle2.min.js?ver=20142311:6
Uncaught ReferenceError: jQuery is not defined

but the them most certainly has the jquery available. Has anyone run into this?
thx
D

Where is the jQuery script?

where it is supposed to be,
xampp\htdocs\agileart\wp-includes\js
& i have been using underscores w/no issues. It is just now that i have enqued the cycle & masonry that it is doing that.
thx
D

But is it linked to the page? And where is it on the page? It needs to appear on the page before the other jQuery scripts.

it is linked but it is a normal wordpress set up.it is not giving me probs w/other js. but just the ones listed above
d

ok solved it. had to make it dependent on jquery

wp_enqueue_script( ‘agile_art-masonry’, get_template_directory_uri() . ‘/js/masonry.pkgd.min.js’, array(‘jquery’), ‘20142311’, true );
Thank you!
D

this however

$( function() {

  var $container = $('.grid').masonry({
    columnWidth: 60
  });

  $container.on( 'click', '.item-content', function() {
    $( this ).parent('.item').toggleClass('is-expanded');
    $container.masonry();
  });
  
});

gets a

Uncaught TypeError: undefined is not a function masonryJsSettings.js?ver=20142311:1(anonymous function)

but i see no reason for it.
D

never mind. found a ref to assist w/that too

jQuery(document).ready(function($){

 var $container = $('.grid').masonry({
    columnWidth: 10
  });

  $container.on( 'click', '.item-content', function() {
    $( this ).parent('.item').toggleClass('is-expanded');
    $container.masonry();
  });



})

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.