开发者

JQueryUI Autocomplete collides with legacy code

My issue is. I have jQueryUI in version 1.8.5 and lot and a lot of legacy source code in a project. In legacy code it happens that there is 3ple times registred plugin autocomplete for jquery. However jQueryUI is registring the very same plugin. So when I type into my javas开发者_如何学JAVAcript:

$('#some_id').autocomplete();

It's not actually a jQueryUI.

Any chance to explicit choose UI?

I tried such approach:

jQuery.fn.myautocomplete = jQuery.ui.autocomplete

And then to use in my code:

$('#some_id').myautocomplete();

But this does not work. (Well it was a blind shoot so I did not expect to much.)

Any suggestion how to workaround the problem.

P.S. Legacy code is blessed by the Pope and cannot be removed for next year or so.


You can:

  1. download jquery.ui without autocomplete
  2. change jquery.ui source
  3. change old plugin source
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜