Style autocomplete with Zurb Foundation

China☆狼群 提交于 2019-12-22 04:41:07

问题


What is the best practice to use Foundation features instead of jQuery CSS for Autocomplete?

Here is my code: http://jsfiddle.net/qhoc/88kfb/

<div class="row">
 <form class="custom">
 <fieldset>
 <legend>Fieldset</legend>
 <div class="row">
  <div class="large-12 columns ui-widget">
   <label for="tags">Input Label</label>
    <input id="tags" type="text" placeholder="large-12.columns">
  </div>
 </div>
</div>   

I just don't like to include another .css file which is overhead on the page:

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />

So I guess I have two questions:

  1. Is there a way to use dropdown from Foundation or something? It seems like dropdown is only for topbar and its css screwed up outside that particular use case.

  2. What is some "standard" way to create the dropdown menu in Foundation? Please help with some example. Because I was thinking it's either bunch of rows or it could be a tweak from dropdown


回答1:


You could try to add the 'f-dropdown' class via jquery to the :

 $('.ui-autocomplete').addClass('f-dropdown');

also set on the app.css o youystyle.css:

.ui-helper-hidden-accessible{display:none}

I hope it helps... http://jsfiddle.net/vgarcias/WdncE/




回答2:


Foundation is now trying to incorporate an auto complete by default, in its next version. You can find the entry in this

https://github.com/zurb/foundation/issues/3100



来源:https://stackoverflow.com/questions/18167538/style-autocomplete-with-zurb-foundation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!