Autocomplete jQuery UI plugin with custom scrollbars

Someone tried to create custom scrollbars for jquery UI autocomplete widget? I am trying to use jScery's jScrollPane component in conjunction with autocomplete widgets, but so far has not had any success. If someone knows about some jquery autocomplete component with custom scrollbars or knows how to change the jquery ui autocomplete widget to support the jscrollpane component, I would appreciate it.

+3
source share
1 answer
....
open: function() {
  $('.ui-autocomplete').width($(this).width());
  if (undefined !== _jScrollPane) {
    _jScrollPaneAPI.destroy();
  }
  $('.ui-autocomplete > li')
    .wrapAll($('<div class="scroll-panel"></div>')
      .width($(this).width())
      .height(_jSheight));
  _jScrollPane = $('.scroll-panel').jScrollPane(settings),
  _jScrollPaneAPI = _jScrollPane.data('jsp');
},
close: function(event, ui) {
  _jScrollPaneAPI.destroy();
  _jScrollPane = undefined;
},
....

Refer to the demo source code for full working code ... thanks.

+6
source

All Articles