How to load jquery ui autocomplete combobox?

Try to load the script in the footer section. <script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js”></script> <script type=”text/javascript” src=”https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js”></script> <script type=”text/javascript”> $(document).ready(function(){ $(“#clientAutocomplete”).autocomplete({ source:’client_autocomplete.php’, minLength:1 }); }); </script> This worked for me

Jquery UI not working

This works for me locally in testing.. add_action(‘wp_enqueue_scripts’,’enq_menu_scripts_and_styles’); function enq_menu_scripts_and_styles() { // UI Core, loads jQuery as a dependancy wp_enqueue_script( ‘uicore’, ‘http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js’, array(‘jquery’) ); // UI Theme CSS wp_enqueue_style( ‘uicss’, ‘http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-darkness/jquery-ui.css’ ); // Selectmenu JS wp_enqueue_script( ‘uisel’, ‘http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/ui.selectmenu.js’ ); // Selectmenu CSS wp_enqueue_style( ‘uicss2’, ‘http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/ui.selectmenu.css’ ); } add_action(‘wp_head’,’select_menu_test_code’); // Simple test code function select_menu_test_code() { … Read more

WordPress Iris Colour Picker adding iOS touch events

After a bit of investigation, the following code will add touch events to the Iris picker which uses jQuery UI. I did have to make the color picker handle 25px x 25px so it’s easier to grab on an iPad, but other than that this works: $(document).on({ touchstart: touchHandler, touchmove: touchHandler, touchend: touchHandler, touchcancel: touchHandler … Read more

How to include jquery-ui library in WordPress?

jquery is enqueued by default on admin side. So, it may not be loading due to your wp_enqueue_script statement. Are you using wp_enqueue_script inside some action hook? Because you have to. I use it like this: add_action( ‘admin_enqueue_scripts-options_page-{page}’, ‘myplugin_admin_scripts’ ); function myplugin_admin_scripts() { wp_enqueue_script(‘jquery’); wp_enqueue_script(‘jquery-ui-core’); }

No Styling for the datepicker in WordPress admin

Here ya go … try this: /* add jquery ui datepicker and theme */ global $wp_scripts; wp_enqueue_script(‘jquery-ui-datepicker’); $ui = $wp_scripts->query(‘jquery-ui-core’); $url = “https://ajax.aspnetcdn.com/ajax/jquery.ui/{$ui->ver}/themes/redmond/jquery.ui.all.css”; wp_enqueue_style(‘jquery-ui-redmond’, $url, false, $ui->ver); This is what I use in my plugin to load a theme. That CDN has all the basic jquery-ui themes. Hope this helps …