开发者

Correct files for jQuery UI Autocomplete

开发者 https://www.devze.com 2023-01-31 14:08 出处:网络
Fairly new to jQuery, trying to use Autocomplete. Went to http://jqueryui.com/download to build my own download, selected \"Autocomplete\" from the \"Widgets\" section. This caused \"Core\", \"Widget\

Fairly new to jQuery, trying to use Autocomplete. Went to http://jqueryui.com/download to build my own download, selected "Autocomplete" from the "Widgets" section. This caused "Core", "Widget", and "Position" to auto-check.

I downloaded my custom jQuery UI, and followed the instructions and included the following in my page.

<link type="text/css" href="css/custom-theme/jquery-ui-1.8.7.custom.css" rel="stylesheet" />    
<script type="text/javascript" sr开发者_高级运维c="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.7.custom.min.js"></script>

But, Autocomplete would not function, and firebug revealed no errors. I decided to include:

<link rel="stylesheet" href="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.css" type="text/css" />
<script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgiframe.min.js"></script>
<script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js"></script>

And everything started working! But I am confused, I thought the jQuery builder would have included all necessary code and styling for Autocomplete to function correctly, so why have I needed to add these extra includes to get it working? Thanks


It appears you are using the autocomplete plugin, rather than the one from jQuery UI

See this question for the difference.

0

精彩评论

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