Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在jquery full calendar 2.x版上选择每天时段_Javascript_Jquery_Css_Fullcalendar - Fatal编程技术网

Javascript 在jquery full calendar 2.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&

下面的代码是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>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)")