【问题标题】:jQuery find and filter datesjQuery 查找和过滤日期
【发布时间】:2012-10-10 08:19:32
【问题描述】:

我有一个常规日历,其中 td 有一个点击事件处理程序。我返回表格单元格(1-31)的值。我还有一个事件列表 - 每天只有 1 个

<div class="event">
<h2>the title</h2>
<div class="date"> October <span class="day">23</span> 2012 </div>
</div>

我需要做的是当我点击日历上的日期时过滤掉事件。

【问题讨论】:

  • 请使用 jquery 和 FIDDLE 提供更多数据。
  • 您应该提供更多代码吗?

标签: jquery date filter


【解决方案1】:

您可以使用ajax

$(document).ready(function(){
 $(".day").on("click",function(){
  $.get("getevents.php?day="+$(this).text(),function(data){
    $("#showing div").html(data);
             //or
    $(".event").find("h2").text(data);   
  })
 })
})

【讨论】:

    猜你喜欢
    • 2012-02-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-21
    • 1970-01-01
    相关资源
    最近更新 更多