I can't enqueue scripts after jquery so that the Dollar sign ($) will be defined
I also tried to register and than enqueue, tried to put the scripts on footer (wp_enqueue_script( 'name', 'url', '', true );
). tried to hook it with add_action( 'plugins_loaded', 'xb_addScripts' );
and/or with add_action( 'wp_enqueue_scripts', 'xb_addScripts' );
with or without version #.
function xb_addScripts(){
//enqueue scripts
wp_enqueue_script( 'xsite_a_js', plugins_url('xSITE-crm/inc/xsite_a_js.js') , array('jquery'), '', false );
wp_enqueue_script( 'jquery_ui', plugins_url('xSITE-crm/inc/jqUI/jquery-ui.min.js') , array('jquery'), '', false );
wp_enqueue_script( 'imgUpload', plugins_url('xSITE-crm/inc/imgUpload.js') , array('jquery'), '', false );
wp_enqueue_script( 'xb_fGenerator', plugins_url('xSITE-crm/inc/xb_fGenerator.js') , array('jquery'), '', false );
wp_enqueue_script( 'xsite_date', plugins_url('xSITE-crm/inc/xsite_dateObj.js') , array('jquery'), '', false );
wp_enqueue_script( 'bootstrap_min', plugins_url('xSITE-crm/inc/js/bootstrap.min.js') , array('jquery'), '', false );
wp_enqueue_script( 'jq_ui_widget', plugins_url('xSITE-crm/inc/jQuery-File-Upload/js/vendor/jquery.ui.widget.js') , array('jquery'), '1.0.0', false );
wp_enqueue_script( 'jq_iframe_transport', plugins_url('xSITE-crm/inc/jQuery-File-Upload/js/jquery.iframe-transport.js') , array('jquery'), '1.0.0', false );
wp_enqueue_script( 'file_upload', plugins_url('xSITE-crm/inc/jQuery-File-Upload/js/jquery.fileupload.js') , array('jquery'), '1.0.0', false );
//enqueue styles
wp_enqueue_style( 'bootstrap_min', plugins_url('xSITE-crm/inc/css/bootstrap.min.css'),'','1','' );
wp_enqueue_style( 'bootstrap_theme_min', plugins_url('xSITE-crm/inc/css/bootstrap-theme.min.css'),'','1','' );
wp_enqueue_style( 'xsite_a_style', plugins_url('xSITE-crm/inc/xsite_a_style.css'),'','1','' );
wp_enqueue_style( 'xb_form_style', plugins_url('xSITE-crm/join/xb_form_style.css'),'','1','' );
wp_enqueue_style( 'jq_css', plugins_url('xSITE-crm/inc/jqUI/jquery-ui.min.css'),'','1','' );
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire