/*
 * Scrollable jQuery UI Autocomplete
 * https://anseki.github.io/jquery-ui-autocomplete-scroll/
 *
 * Copyright (c) 2018 anseki
 * Licensed under the MIT license.
 */
/*function autocomplete(inp, arr) {
document.addEventListener("input", function(e) {
var a = document.createElement("DIV");
a.setAttribute("class", "pranjal");
;(function($, undefined) {
'use strict';

  });
  });
}*/	 


/*function addCode() { 
            document.getElementById("skill-list-block").innerHTML +=  
              "<h3>This is the text which has been inserted by JS</h3>"; 
        } */
	
$.widget('ui.autocomplete', $.ui.autocomplete, {
	

  _resizeMenu: function() {

	  
    var abc, ul, lis, ulW, barW;
    if (isNaN(this.options.maxShowItems)) { return; }
	  
	  
	  
    ul = this.menu.element
      .scrollLeft(0).scrollTop(0) // Reset scroll position
      .css({overflowX: '', overflowY: '', width: '', maxHeight: ''}); // Restore
    lis = ul.children('li').css('whiteSpace', 'nowrap');

    if (lis.length > this.options.maxShowItems) {
		 
		
      ulW = ul.prop('clientWidth');
      ul.css({overflowX: 'hidden', overflowY: 'auto',
        maxHeight: lis.eq(0).outerHeight() * this.options.maxShowItems + 1}); // 1px for Firefox
      barW = ulW - ul.prop('clientWidth');
      ul.width('+=' + barW);
    }

    // Original code from jquery.ui.autocomplete.js _resizeMenu()
    ul.outerWidth(Math.max(
      ul.outerWidth() + 1,
      this.element.outerWidth()
    ));
  }
	
	
});

$(function() {
		var abc;
	abc = document.createElement("DIV");
      abc.setAttribute("id", this.id + "autocomplete-list");
      abc.setAttribute("class", "autocomplete-items");
		this.appendChild(abc);
}),



/*})(jQuery);*/

/*function appendText() {
 var txt3 = document.createElement("div");
	txt3.setAttribute("class", "autocomplete-items");
	$("body").append(txt3);
}*/
 