2014-02-23 2 views
0

jQuery 1.7.2 및 Full Calender 1.6.4를 사용하고 있습니다. 이제 클릭 이벤트와 더블 클릭 이벤트를 추가하려고하는데 성공하지 못했습니다.jQuery 전체 캘린더 렌더 이벤트

나는 주위에 작업 아래 시도했지만이 FF에서 작동하지만

eventRender: function (event, element) { 
    element.bind('click', function() { 
     var doubleClickOpportunity = 200, // Adjust this to whatever feels right 
     clicker = element.data('clicker'); // Holder for the doubleclick setTimeout 


     if (clicker) { 
     // If there's a setTimeout stored in clicker, then this is a double click 
     clearTimeout(clicker); 
     element.data('clicker', ''); 
     element.trigger('doubleclick'); 
     } else { 
     // Otherwise, it's either a single click or the beginning of a double click 

     // So set a timer to decide which it is - if the timer runs out, 
     // it's just a single click. 
     element.data('clicker', setTimeout(function() { 
      element.data('clicker', ''); 
      element.trigger('singleclick'); 
     }, doubleClickOpportunity)); 
     } 
    }); 
    element.bind('doubleclick', function (e) {//dblclick 
     if (!confirm(Res.deleteEvent)) 
     return false; 


     $('#calendar').fullCalendar('removeEvents', event.id); 
    }); 
    element.bind('singleclick', function (e) { 
     alert("I am click"); 
    }); 
    } 

답변

0

확인을 IE에서이 링크 Milind 작동하지 : 어쩌면 당신을 도울 것이 달력에 스크롤 이벤트를 결합하는 것입니다

을 네가 원하는 걸해라. 파이어 폭스에서 이벤트를 바인딩 크롬/IE 다르다는 것을

Fullcalendar mousewheel bind event

알 수 있습니다.

+0

먼저 답장을 보내 주셔서 감사합니다. 마우스 휠 이벤트를 사용할 수 없으며 웹 또는 모바일에서 패드를 사용할 수 있습니다. 따라서 사용자에게 어떤 종류의 제한이 될 수 있습니다. – Milind

+0

물론, 이벤트 바인딩을 수행하는 데 도움이되도록 코드를 분석해야합니다. 예를 들어 onclick 이벤트를 div/element에 바인딩하는 것이 chrome 및 firefox와 다르다는 것을 알았 으면합니다. –

관련 문제