Signin  Pricing  Examples  Support

Libraries > jquery.ui.autocomplete.html.js

jquery.ui.autocomplete.html.js - Search Live Website Code
It's like doing CTRL+F on millions of websites' source code



NerdyData is a search engine for source code. Search the source code of 200 million websites.


JAVASCRIPT FILE http://tabelepilkarskie.com/js/jquery.ui.autocomplete.html.js

Function Explorer



Libraries on tabelepilkarskie.com


jquery.flot.pie.js

jquery.flot.time.js

jquery.cookie.js

jquery.ui.autocomplete.html.js

jstz.min.js

script.js



Explore More


jquery.lazyload.min.js

jquery.stellar.min.js

jquery.validation.min.js

jquery.magnific-popup.min.js

jquery.ui.autocomplete.html.js
				
/*
 * jQuery UI Autocomplete HTML Extension
 *
 * Copyright 2010, Scott González (http://scottgonzalez.com)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * http://github.com/scottgonzalez/jquery-ui-extensions
 */
(function( $ ) {

var proto = $.ui.autocomplete.prototype,
	initSource = proto._initSource;

function filter( array, term ) {
	var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
	return $.grep( array, function(value) {
		return matcher.test( $( "<div>" ).html( value.label || value.value || value ).text() );
	});
}

$.extend( proto, {
	_initSource: function() {
		if ( this.options.html && $.isArray(this.options.source) ) {
			this.source = function( request, response ) {
				response( filter( this.options.source, request.term ) );
			};
		} else {
			initSource.call( this );
		}
	},

	_renderItem: function( ul, item) {
		return $( "<li></li>" )
			.data( "item.autocomplete", item )
			.append( $( "<a></a>" )[ 'html']( item.label ) )
			.appendTo( ul );
	}
});

})( jQuery );


A B C D E F G H I J K L M N O P Q R S T U V W X Y Z