Javascript 在jquery full calendar 2.x版上选择每天时段
下面的代码是FullCalendar jquery插件2版生成的一段代码。自从1.x版以来,它在使用的类中有了一些变化Javascript 在jquery full calendar 2.x版上选择每天时段,javascript,jquery,css,fullcalendar,Javascript,Jquery,Css,Fullcalendar,下面的代码是FullCalendar jquery插件2版生成的一段代码。自从1.x版以来,它在使用的类中有了一些变化 <div class="fc-slats"> <table> <tbody> <tr> <td class="fc-axis fc-time fc-widget-content" style="width: 37px;"><span&
<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正确吗?您的jquery不正确。您可以使用以下选项:
$(".fc-slats > table tbody tr").find("td:eq(1)")
当我执行slots=$(“.fc slats>table tbody tr td:eq(1)”)时。length返回1…这是不对的。应该返回更多,因为有很多槽(我的例子中有更多槽),它起作用了。谢谢。你应该编辑你的答案,让我选择正确的答案。
$(".fc-slats > table tbody tr").find("td:eq(1)")