JQuery select by inner text

前端 未结 3 1251
我寻月下人不归
我寻月下人不归 2020-12-30 05:19

I am doing a project with fullcalendar and I need to be able to select an element based on the day number. Here is a sample of the element I need to select:



        
3条回答
  •  天命终不由人
    2020-12-30 05:54

    Write your own filter function:

    $("div.fc-day-number").filter(function (){
        return $(this).text() == day;
    }).parent().parent().css({ 'background-color': 'Green' });
    

提交回复
热议问题