You don’t have to manually handle dependencies. That is the whole point of the enqueue system, it handles dependencies for you.
There’s nothing wrong with the code in your post, so if you want help on it, you’ll need to ask about your problem more specifically.
Related Posts:
- JSON parsing error syntax error unexpected end of input
- Jquery Ajax Posting JSON to webservice
- TypeError: $.ajax(…) is not a function?
- Can’t get a JSON object in response to an Ajax request with wp_ajax
- AJAX returns response 0
- How to Use JSON With AJAX?
- Cannot access elements of json object
- wp_ajax() question.. not using wp_enqueue_script?
- WordPress Ajax problem with undefined url
- How to get those data using with ajax json?
- Intergrating agile carousel to wordpress: how to write the ajax_callback function
- Using WP_Query to grab custom meta values, foreach to json object
- How to retrieve WP_Object that is inside an array of another array
- Can’t add classes using jQuery from a JSON string with get_body_class()
- Ajax Request with jQuery not happening
- Using WP Ajax and jQuery to process multiple forms on the same page?
- How to send multiple data fields via Ajax?
- How to fix the ‘Missing required request header. Must specify one of: origin,x-requested-with’ Ajax Error
- What’s the point of the X-Requested-With header?
- SON Post with Customized HTTPHeader Field
- how to loop through JSON array in jQuery?
- Javascript : array.length returns undefined
- How to correctly include jquery-ui effects on wordpress
- How do I make script load after jquery?
- Correct Method to run scripts with dependencies without enqueue?
- WordPress AJAX File Upload – FrontEnd
- How to control what jQuery version to include, with wp_enqueue_script
- Creating Ajax backend for Specialised Page Template? Should admin-ajax.php be used?
- Adding jquery and thickbox to WordPress theme
- Best Practices for Seperating jQuery from HTML/PHP
- Infinite scroll / lazy loading with NextGen Gallery [closed]
- How to get a jQuery script to run on a page?
- WP set auth cookie using Ajax is not saved to browser
- jquery & ajax getting data to php in wordpress
- Moving jQuery to the footer without using de-register in WordPress
- Passing a varible from jQuery to PHP
- Asynchronous Javascript Loaders
- ajax call in wordpress front end
- wp_enqueue_script and wp_register_script in theme not working
- wp_localize_script, variable is not defined in jquery
- Using wp_ajax and wp_ajax_nopriv hooks
- WP REST return value to error function from Request
- jQuery on Underscores menu
- When does WordPress automatically enqueue jQuery?
- WordPress Ajax not function as I expect… what’s wrong?
- Loading posts via AJAX in a hidden div with updated URL?
- How to get a value from PHP in Jquery through Ajax
- Best way to include jQuery and fire with script at bottom of container
- Jquery not showing in homepage
- jQuery Ajax returning correct Response, but after redirect to 404 Error
- Front-end Ajax File Upload
- Correct way to write jQuery functions in WordPress
- WooCommerce Ajax Cart Update Stopped Working
- WordPress AJAX Load More function duplicating a post
- AJAX Loaded Glossary like Search results with links to other entries from custom table
- WordPress jquery files not being enqueued
- Trouble with WordPress Ajax Login System – 302
- Why does javascript works only if logged in?
- Plugins loading multiple copies of JQuery
- Cannot enqueue jQuery correctly using Google CDN
- Unexpected script loading order
- Problem getting .js file to load via a plugin
- Using jquery-1.7.2.min.js instead of the wordpress jquery
- WordPress error when replacing local jQuery by externally-hosted
- Why use admin-ajax.php when loading pages through AJAX?
- WP Rest Api / Ajax POST not working when not logged in
- Creating a new div onclick wordpress+ajax
- How to enque js script in footer that are not in .js file?
- Properly embed javascript into WP (using function.php) – doesn’t work?
- jQuery tabs plugin with callback to fetch data
- Can’t delete the default jQuery in the theme
- Custom AJAX form not working async
- Null/undefined return in WordPress AJAX request
- Manipulate retrieved ajax data in php
- Using Jquery submit with ajax request
- Including Older Version of jQuery for IE7/IE8
- How To Include JavaScript Files Only In Single Posts?
- WordPress Front-End Theme Editor
- Display full WordPress post under search form using AJAX
- Bootstrap and jQuery error: $ is not defined
- Fire action after enqueue script
- AJAX POST Value not being returned – WordPress – AutoTrader API
- Uncaught ReferenceError: jQuery is not defined
- wordpress ajax upload media not working
- How to pull data from a table using wpdb?
- Is not using admin-ajax to ajax submissions okay?
- Bootstrap with separate js File
- How to add JS snippet before closing tag?
- How to specify url for ajax call in wordpress plugin
- Possibility of creating a folder in the wordpress root install and installing a file there, all via plugin?
- Call admin ajax using absolute url? Relative URL breaks (frontend ajax)
- Page keeps refreshing with Ajax form
- Scripts only working on home page
- JS plugin script loading but not working
- Convert WordPress SACK code to new admin-ajax
- Get selected value with PHP and jQuery
- Ajax request with jQuery without WP_ajax
- Ajax Query returns zero
- Dynamically populate Cascading Dropdown from MySQL using JQuery/AJAX [closed]
- How to combine jQuery in-place editor with $wpdb->update