I need jquery.js would be first in the head then colorbox.js then my custom-script.js. My custom script depends on jquery and colorbox. But it always higher in the head of page then colorbox.js. I need to change that order. What should I do to do this? Sorry for my english.
<?php
/*Functions file for child theme*/
define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_stylesheet_directory_uri() . '/inc/' );
require_once dirname( __FILE__ ) . '/inc/options-framework.php';
function mychildtheme_setup() {
show_admin_bar(false);
wp_register_script( 'main', get_stylesheet_directory_uri() . '/js/main.js', array('jquery', 'jquery.colorbox-min'), false, false);
wp_enqueue_script( 'main' );
}
add_action('after_setup_theme', 'mychildtheme_setup');
add_action( 'wp_enqueue_scripts', 'mychildtheme_setup', 10000 );
?>