JSHint fixes for user-suggest.js.
props dougwollison. fixes #26017. git-svn-id: https://develop.svn.wordpress.org/trunk@26238 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4c416b2549
commit
7a08bc4b70
@ -1,13 +1,24 @@
|
||||
(function($) {
|
||||
var id = 'undefined' !== typeof current_site_id ? '&site_id=' + current_site_id : '';
|
||||
/* 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: ( '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'); }
|
||||
position: position,
|
||||
open: function() {
|
||||
$( this ).addClass( 'open' );
|
||||
},
|
||||
close: function() {
|
||||
$( this ).removeClass( 'open' );
|
||||
}
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
})( jQuery );
|
Loading…
Reference in New Issue
Block a user