0

I have a calender that shows date in table format. I have click event on each of the <td> elements for some additional function processing. Can multi-select with Ctrl be enabled on the table elements and do the function call for all the dates selected in one go? Thanks.

Below is the code :

$("#table_calender td").live('click', function(e){

    if($(this).hasClass('booked')){
     alert('already booked');
    }
    else{
          if(e.ctrlKey) {
            alert('ctrl clicked');
          }
          else {
            alert('not booked');
          }
    }

});
4

1 回答 1

2

当然。你能行的。但是您可能必须编写一些代码。

添加隐藏输入。在点击 td. 使用所选日期更新隐藏。在选择时选择日期。

于 2012-12-14T11:39:22.450 回答