Jump to content
  • 0

fullcalendar устанавливая цвета для 1 ячейки события перестают работать


mstdmstd
 Share

Question

Всем привет,
Используя fullcalendar (http://arshaw.com/fullcalendar/) мне нужно установить цвет для 1ой ячейки под мышкой
Я нашел пример:
http://stackoverflow.com/questions/14128222/hover-effect-on-one-cell-of-agendaweek-fullcalendar

С кодом:
 

Paste this code after $('#calendar').fullCalendar( ... ); This will create addition TD in table $("table.fc-agenda-slots th").each(function () {    $(this).width(50);});$("table.fc-agenda-slots td.fc-widget-content").each(function () {    $(this).width(($("table.fc-agenda-days thead th.fc-col0").width()));    $(this).after("<td class=\"fc-widget-content\"><div style=\"position:relative\"></div></td>");    $(this).after("<td class=\"fc-widget-content\" style=\"width:" + $("table.fc-agenda-days thead th.fc-col5").width() + "px\"><div style=\"position:relative\"></div></td>");    $(this).after("<td class=\"fc-widget-content\" style=\"width:" + $("table.fc-agenda-days thead th.fc-col4").width() + "px\"><div style=\"position:relative\"></div></td>");    $(this).after("<td class=\"fc-widget-content\" style=\"width:" + $("table.fc-agenda-days thead th.fc-col3").width() + "px\"><div style=\"position:relative\"></div></td>");    $(this).after("<td class=\"fc-widget-content\" style=\"width:" + $("table.fc-agenda-days thead th.fc-col2").width() + "px\"><div style=\"position:relative\"></div></td>");    $(this).after("<td class=\"fc-widget-content\" style=\"width:" + $("table.fc-agenda-days thead th.fc-col1").width() + "px\"><div style=\"position:relative\"></div></td>");});And this is the style css for hover:table.fc-agenda-slots td.fc-widget-content{    border-right: 1px #DDD solid;}table.fc-agenda-slots td.fc-widget-content:hover{    background-color: #F1F1F1;}

Это работает, когда мышь над ячейкой - она меняет цвет
Но проблема в том, что с этим кодом обработка событий перестает работать, вроде события eventClick, определенное как:
eventClick: function(calEvent, jsEvent, view) {   // Triggered when the user clicks an event. http://fullcalendar.io/docs/mouse/eventClick/

Есть ли способ передавать все события в fullcalendar обьект, а не в таблицу нарисованную кодом выше?

  Спасибо!
 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy