I am trying to add a custom jQuery script to the theme function using this command
function celeb_js() {
wp_enqueue_script( 'celeb', get_stylesheet_directory_uri().'/js/celeb.js', array('jquery'), 'null', true );
}
After using inspector on page load the script does load, however it is loading and firing before jQuery gets loaded. I have attached my jquery script below.
$( document ).ready(function() {
$("a[title=\"auctions-menu\"]").insertAfter('.sub-links');
$(".nav-ad").appendTo('.sub-links').addClass('open');
});