1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wordpress_ynh.git synced 2024-09-03 20:36:10 +02:00
wordpress_ynh/sources/wp-admin/js/user-suggest.js
2013-12-04 17:03:46 +00:00

13 lines
No EOL
566 B
JavaScript

(function($) {
var id = 'undefined' !== typeof current_site_id ? '&site_id=' + current_site_id : '';
$(document).ready( function() {
$( '.wp-suggest-user' ).autocomplete({
source: ajaxurl + '?action=autocomplete-user&autocomplete_type=add' + id,
delay: 500,
minLength: 2,
position: ( 'undefined' !== typeof isRtl && isRtl ) ? { my: 'right top', at: 'right bottom', offset: '0, -1' } : { offset: '0, -1' },
open: function() { $(this).addClass('open'); },
close: function() { $(this).removeClass('open'); }
});
});
})(jQuery);