As suggested in comments, this kind of error is caused by the fact that WordPress loads jquery in noconflict mode. The most common workaround is to wrap all functions in your script file:
jQuery(document).ready(function($) { ... scripts ... }
Another, more risky option is to switch off noconflict mode by starting the script file with this:
$ = jQuery.noConflict();
Related Posts:
- My javascript is returning this error: $.ajax is not a function
- Can’t get a JSON object in response to an Ajax request with wp_ajax
- Infinite scroll / lazy loading with NextGen Gallery [closed]
- Ajax call does not activate callback function
- Trying to get single posts to load on the front page via ajax
- Ajax not firing properly using Firefox, but works in Chrome
- How to Use JSON With AJAX?
- Using wp_ajax and wp_ajax_nopriv hooks
- wp_ajax unauthenticated and authenticated
- WordPress ajax function parameter value not being passed
- WordPress customizer refresh screen after save
- Loading posts via AJAX in a hidden div with updated URL?
- WooCommerce Ajax Cart Update Stopped Working
- How to Dynamically Load Content Into Body of Bootstrap Modal Window?
- Trouble with WordPress Ajax Login System – 302
- videopress videos are not displayed when loading the content with ajax in a lightbox
- How to return multiple arguments from AJAX callback function
- url – ajax loaded but no JS
- Ajax Validation for reCaptcha
- Properly embed javascript into WP (using function.php) – doesn’t work?
- Custom AJAX form not working async
- AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0
- Is there some jQuery conflict here?
- Ajax page load in wordpress the right way?
- Orderby post__in Not Working Correctly?
- Get ajaxForm response value
- Retrieve customizer value using ajax or customizer api and print the value in theme
- Displaying contents of a tab
- Widget won’t work due to old JavaScript? Any ideas how to make it work? [closed]
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- Infinite Scrolling in Asp.Net MVC with jQuery / AJAX Issues
- Adding images to a Bootstrap Carousel with AJAX
- XML Parsing Error: not well-formed in FireFox but good in Chrome
- javascript function wait until another function to finish
- Refresh/reload the content in Div using jquery/ajax
- How to get a cross-origin resource sharing (CORS) post request working
- jQuery Form Validation before Ajax submit
- Download a file by jQuery.Ajax
- ajax stopped working when not logged in?
- Is there a way to enable Cross-Origin Resource Sharing for WordPress’ ajaxurl?
- How to get attachment id as soon as it is uploaded through media uploader in jquery?
- Using ‘$’ instead of ‘jQuery’ in WordPress
- AJAX call returns 0
- Automatically decrease font size for long words
- jQuery and AJAX Not working with Select Form Element
- Javascript included but alert() function not working
- Bind to WPSetAsThumbnail
- How wp_enqueue_script works?
- How to properly add Bootstrap and JQuery Javascripts?
- Access/update database with jQuery
- WordPress Jquery Fade in, Fade out effect
- AJAX Contact Form Issue
- Ajax return code 400
- Is there a restriction in WP on the use of jQuery load function?
- Gutenberg Filtering Metaboxes by Post Format
- JSON output returns page source code [closed]
- Display data on same page as form without refresh
- Dealing with a library that depends on jQuery
- Ajaxify calendar
- start.js:45TypeError: Not enough arguments on Safari [closed]
- I want to import my Json file into a custom made display-modal. How do i link my Json file?
- Help with a jQuery Carousel
- Passing a varible from jQuery to PHP
- Retrieve post info within AJAX helper function
- Fall Back Google CDN in JavaScript
- I have an old version of jQuery showing up. How do I figure out where it is coming from?
- Search input area autogrow – how?
- Get value of selected option in select field in a WordPress form
- How to retrieve WP_Object that is inside an array of another array
- WordPress Insert not working with ajax
- Search query with Ajax
- WP AJAX API with JS file
- Screen Options JavaScript Code
- Getting jQuery AJAX to work in WordPress (getting -1)
- Theme has superfish – how to add supersubs?
- Which hook to use when adding ajax to viewer-facing side?
- javascript onClick update user_meta from jquery.ajax
- How to use wp_ajax_set_post_thumbnail?
- Add JQuery As Code Snippet
- Form validation before submitting
- Multiple Notifications SetInterval
- Site images are fixed in front of my site content [closed]
- JQuery toggle in Visual Composer
- jQuery not working for media uploader
- How to toggle custom WP archive list
- owl carousel not working after ajax load [duplicate]
- WordPress version for this autocomplete jQuery code
- Uncaught TypeError: undefined is not a function (shortcode-box)
- jQuery AJAX add json2 dependency?
- Running javascript in a child theme. Works in jsfiddle
- How to block action if post is “dirty”?
- How to pass more information though separate post keys via AJAX
- WordPress video end function [duplicate]
- Ensure an external javascript file called from plugin is loaded after jquery is called
- Why my vertical tab js code is refreshing the page continuously? [closed]
- bootstrap-slider.js by seiyria not working in wordpress
- Load loop images on click / defer image loading until click or other event
- Individual Pages are loading halfway down
- iOS and ajaxComplete