Jquery plugins 使用手风琴和;性感组合“;插件

Jquery plugins 使用手风琴和;性感组合“;插件,jquery-plugins,accordion,jquery,Jquery Plugins,Accordion,Jquery,我是新来的,有以下问题 案例: 我们有一个手风琴,在这个手风琴里我们有一个性感的组合框 <html> <head> <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" /> <script src="http://code.jquery.com/jquery-latest.js"><

我是新来的,有以下问题

案例:

我们有一个手风琴,在这个手风琴里我们有一个性感的组合框

    <html> 
<head> 
  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" /> 

  <script src="http://code.jquery.com/jquery-latest.js"></script> 

  <script type="text/javascript" src="../../../../Library/WebServer/Documents/sexy-combo/lib/jquery.sexy-combo-2.1.2.min.js"></script> 
  <script type="text/javascript" src="../../../../Library/WebServer/Documents/sexy-combo/examples/usage.js"></script> 
  <script type="text/javascript" src="../../../../Library/WebServer/Documents/sexy-combo/jquery.autogrow.js"></script> 
  <script type="text/javascript" src="../../../../Library/WebServer/Documents/sexy-combo/lib/jquery-1.3.2.min.js"></script> 
  <script type="text/javascript" src="../../../../Library/WebServer/Documents/sexy-combo/lib/jquery.bgiframe.min.js"></script> 
  <script type="text/javascript" src="../../../../Library/WebServer/Documents/sexy-combo/development-bundle/ui/ui.core.js"></script> 
  <script type="text/javascript" src="../../../../Library/WebServer/Documents/sexy-combo/development-bundle/ui/ui.accordion.js"></script> 

  <link rel="stylesheet" type="text/css" href="../../../../Library/WebServer/Documents/sexy-combo/lib/sexy-combo.css" /> 
  <link rel="stylesheet" type="text/css" href="../../../../Library/WebServer/Documents/sexy-combo/skins/sexy/sexy.css" /> 

 <script type="text/javascript"> 

    $(document).ready(function(){ 
    $("#accordion").accordion(); 
    $("#basic-combo").sexyCombo(); 
  }); 
  </script> 


</head> 
<body style="font-size:62.5%;"> 

<div id="accordion"> 
   <h3><a href="#">Form A</a></h3> 
   <div> 
      <p>Please fill out the following:</p> 
      <p>1. What cookies do you like?</p> 
      <p><select id="basic-combo" name="resObj"  size="2"> 
           <option>jelly</option> 
           <option>biscuit</option> 
           <option>chocolate</option> 
            </select> 
        </p> 
      <p>2. What ice cream do you like?</p> 
      <p><select id="empty-combo" name="sort"  size="2"> 
           <option>strawberry</option> 
           <option>chocolate</option> 
           <option>vanilla</option> 
            </select></p> 
      <p>3. please tell us, how did you get attention to this site?</p> 
      <p> 
         <textarea style="width: 400px; height: 84px; min-height: 80px;" class="expanding" name="myTextarea"></textarea> 
      </p> 
   </div> 

<h3><a href="#">Form B</a></h3> 
   <div> 
      <p>4. Please tell us the minimum and max amount of chocolate that you eat:</p> 
      <p>min 
           <input name="minConsump" type="text" id="start" size="5" /> 
            max 
            <input name="maxConsump" type="text" id="finish" size="5" /> 
            required time (in minutes) that you take to eat the amount 
            <input name="reqTime" type="text" id="time" size="5" /> 

      </p> 
   </div> 
</body> 
</html> 

$(文档).ready(函数(){
$(“#手风琴”)。手风琴();
$(“#基本组合”).sexyCombo();
}); 
请填写以下内容:

一,。你喜欢什么饼干?

果冻 饼干 巧克力

二,。你喜欢什么冰淇淋?

草莓的 巧克力 香草

三,。请告诉我们,您是如何关注该网站的?

四,。请告诉我们您吃巧克力的最小量和最大量:

闵 最大值 进食量所需的时间(分钟)

问题: -手风琴的作品很好,但性感组合没有,你可以看到“正常”的选择框

已尝试/奇怪现象: -删除$(“#accordion”).accordion();因为性感组合有效

可能的原因: -手风琴在性感组合对象之前开始…毕竟性感组合对象没有被加载或被手风琴对象某种程度的“隐藏”

有人知道这种行为的原因是什么吗?或者如何修复它

在阅读了这里的一些主题后,我发现了smth。就像jquerylive插件一样,也许我确实需要这个插件来处理它,当accordio加载时,sexy combo插件也会加载

致意


leejin

我在对话框中使用sexyCombo时发现了类似的问题,因此值得检查在手风琴中使用sexyCombo时是否存在相同的问题

检查完标记后,我意识到在对话框中呈现组合时,列表的高度被设置为0

我在本地版的sexyCombo上添加了一个肮脏的黑客。查看Javascript的第194行(ish):

this.singleItemHeight=this.listItems.outerHeight()


出于某种原因,outerHeight()返回0,所以我只是添加了一个检查,以查看singleItemHeight是否为0,如果是,请将其设置为合理的值。

如果这是一个令人痛苦的问题,很抱歉,但我最近在一个项目中使用了sexy combo,它并不是人们所说的全部。。。它只是没有做你期望的下拉列表的事情。我的团队中有人找到了一个更好的替代方案(虽然对我们来说太晚了…),我正在寻找这个替代方案,但没有找到。如果你有兴趣的话,最坏的情况是他明天会来,你能坚持到那个时候吗?找到了。。。