CoreFiles by mySites.guru
user-suggest.js24 lines, 673 bytes, from wordpress-3.8.21.zip
Raw History Compare with 3.8.20
md5
6d5e23d3e9c18375703c379fe2eeb0ed
sha1
9eb2eac7b448675629bff96b0cc6d4c6f0e724fd
sha256
416085df9f14550dbacb8aa08196e1b64b7c905c2bd6550808a3a0b1b8db8588
/* global ajaxurl, current_site_id, isRtl */

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

The same content is in 46 releases, WordPress 3.8-beta-1 to 3.8.41. See them all, or every version of this file.