0

我正在使用 Footable.js(加上使它工作所需的所有其他 js 文件),一切看起来都很棒,但是当我使用下拉列表(选择选项值)过滤器按第 3 列过滤表格时,10 个选择中只有 7 个工作。我检查了所有的拼写。不知道为什么其中 3 个不能像其他 7 个那样工作并过滤表格。

搜索过滤器

Search: <input id="filter" type="text"/></div>
   <div id="degree-bar">Type of Degree: <select class="filter-status">
    <option></option>
    <option value="certificate">Certificate</option>
    <option value="minor">Minor</option>
    <option value="associate">Associate</option>
    <option value="bachelor's">Bachelor's</option>
    <option value="bachelor's/master's">Bachelor's/Master's</option>
    <option value="licensure">Licensures</option>
    <option value="occupational">Occupational endorsements</option>
    <option value="post-baccalaureate">Post-baccalaureate licensure</option>
    <option value="special">Special training programs</option>
    <option value="pre-professional">Pre-professional opportunities</option>
  </select>

表格的一部分:它将对学士、副学士和证书进行排序,但不会对特殊或职业进行排序。

<tr>
      <td><a href="http://www.uaf.edu/catalog/current/programs/yupik_lang_culture.html">Yup'ik Language and Culture</a></td>
      <td><a href="http://www.uaf.edu/anlc/classes/">College of Liberal Arts</a></td>
      <td><span title="bachelor's">bachelor's</span></td>
    </tr>
     <tr>
      <td><a href="http://www.uaf.edu/catalog/current/programs/yupik_lang.html">Yup'ik Language Proficiency</a></td>
      <td><a href="http://www.uaf.edu/anlc/classes/">College of Liberal Arts</a></td>
      <td><span title="certificate">certificate</span>, <span title="associate">associate</span></td>
    </tr>
     <tr>
      <td><a href="http://www.uaf.edu/catalog/current/programs/alaska_law_enforcement.html">Law Enforcement Academy</a></td>
      <td><a href="http://www.ctc.uaf.edu/programs/lawacad/">College of Rural and Community Development</a></td>
      <td><span title="special">special training program</span></td>
    </tr>
     <tr>
      <td><a href="http://www.uaf.edu/catalog/current/programs/paramedic.html">Paramedic Academy</a></td>
      <td><a href="http://www.ctc.uaf.edu/programs/paramedic/">College of Rural and Community Development</a></td>
       <td><span title="special">special training program</span></td>
    </tr>
     <tr>
      <td><a href="http://www.uaf.edu/catalog/current/programs/wm_tech.html">Welding and Materials Technology</a></td>
      <td><a href="http://www.ctc.uaf.edu/programs/weld/">College of Rural and Community Development</a></td>
      <td><span title="special">special training program</span></td>
    </tr>
     <tr>
      <td><a href="http://www.uaf.edu/catalog/current/programs/admin_assist.html">Administrative Assistant</a></td>
      <td><a href="http://www.ctc.uaf.edu/programs/aaa/">College of Rural and Community Development</a></td>
      <td><span title="occupational">occupational endorsement</span></td>
    </tr>

要查看它的实际效果: 网页完成

4

1 回答 1

1

从您发布的代码来看,问题似乎是选项和跨度值末尾的“s”。

选项值是:(注意背书和程序末尾的“s”)

<option value="occupational">Occupational endorsements</option>
<option value="special">Special training programs</option>

行中的跨度值如下所示:(注意在背书和程序的末尾没有's')

<span title="special">occupational endorsement</span>
<span title="special">special training program</span>

这是一个演示该问题的 plunk:(我在两个地方都放了一个“s”) http://plnkr.co/edit/yCmyoJmFpkzcUplaMgVg

于 2014-06-18T22:30:02.797 回答