Changeset 26238
- Timestamp:
- 11/16/2013 08:40:04 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/user-suggest.js
r22798 r26238 1 (function($) { 2 var id = 'undefined' !== typeof current_site_id ? '&site_id=' + current_site_id : ''; 1 /* global ajaxurl, current_site_id, isRtl */ 2 3 (function( $ ) { 4 var id = ( typeof current_site_id !== 'undefined' ) ? '&site_id=' + current_site_id : ''; 3 5 $(document).ready( function() { 6 var position = { offset: '0, -1' }; 7 if ( typeof isRtl !== 'undefined' && isRtl ) { 8 position.my = 'right top'; 9 position.at = 'right bottom'; 10 } 4 11 $( '.wp-suggest-user' ).autocomplete({ 5 12 source: ajaxurl + '?action=autocomplete-user&autocomplete_type=add' + id, 6 13 delay: 500, 7 14 minLength: 2, 8 position: ( 'undefined' !== typeof isRtl && isRtl ) ? { my: 'right top', at: 'right bottom', offset: '0, -1' } : { offset: '0, -1' }, 9 open: function() { $(this).addClass('open'); }, 10 close: function() { $(this).removeClass('open'); } 15 position: position, 16 open: function() { 17 $( this ).addClass( 'open' ); 18 }, 19 close: function() { 20 $( this ).removeClass( 'open' ); 21 } 11 22 }); 12 23 }); 13 })( jQuery);24 })( jQuery );
Note: See TracChangeset
for help on using the changeset viewer.