以下代码是由fullcalendrar jquery插件ver 2生成的一段代码。它在它使用的类中从ver 1.x开始有所改变。
<div class="fc-slats">
<table>
<tbody>
<tr>
<td class="fc-axis fc-time fc-widget-content" style="width: 37px;"><span>07:00</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 37px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 37px;"></td
<td class="fc-widget-content"></td>
</tr>
<tr class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 37px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr>
<td class="fc-axis fc-time fc-widget-content" style="width: 37px;"><span>08:00</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 37px;"></td>
<td class="fc-widget-content"></td>
</tr> <!--etc-->
<tbody>
<table>
</div>
我想使用jquery选择遵循以下路径的每秒td(日插槽)
.$("fc-slats > table tbody tr").children.eq(1)
上面的jquery是否正确?
答案 0 :(得分:5)
你的jquery不正确。您可以使用以下内容:
$(".fc-slats > table tbody tr").find("td:eq(1)")