media/js/vendor/selectize/selectize.js
function(i) {
			var self = this;
	
			if (self.settings.mode === 'single') {
				i = self.items.length;
			} else {
				i = Math.max(0, Math.min(self.items.length, i));
			}
	
			if(!self.isPending) {
				// the input must be moved by leaving it in place and moving the
				// siblings, due to the fact that focus cannot be restored once lost
				// on mobile webkit devices
				var j, n, fn, $children, $child;
				$children = self.$control.children(':not(input)');
				for (j = 0, n = $children.length; j < n; j++) {
					$child = $($children[j]).detach();
					if (j <  i) {
						self.$control_input.before($child);
					} else {
						self.$control.append($child);
					}
				}
			}
	
			self.caretPos = i;
		}
function(i) {
			var self = this;
	
			if (self.settings.mode === 'single') {
				i = self.items.length;
			} else {
				i = Math.max(0, Math.min(self.items.length, i));
			}
	
			if(!self.isPending) {
				// the input must be moved by leaving it in place and moving the
				// siblings, due to the fact that focus cannot be restored once lost
				// on mobile webkit devices
				var j, n, fn, $children, $child;
				$children = self.$control.children(':not(input)');
				for (j = 0, n = $children.length; j < n; j++) {
					$child = $($children[j]).detach();
					if (j <  i) {
						self.$control_input.before($child);
					} else {
						self.$control.append($child);
					}
				}
			}
	
			self.caretPos = i;
		}
function ( i ) { var self = this ; if ( self . settings . mode === 'single' ) { i = self . items . length ; } else { i = Math . max ( 0 , Math . min ( self . items . length , i ) ) ; } if ( ! self . isPending ) { // the input must be moved by leaving it in place and moving the // siblings, due to the fact that focus cannot be restored once lost // on mobile webkit devices var j , n , fn , $children , $child ; $children = self . $control . children ( ':not(input)' ) ; for ( j = 0 , n = $children . length ; j < n ; j ++ ) { $child = $ ( $children [ j ] ) . detach ( ) ; if ( j < i ) { self . $control_input . before ( $child ) ; } else { self . $control . append ( $child ) ; } } } self . caretPos = i ; }
Moves the caret to the specified index.

@param {int} i
Moves the caret to the specified index .