tags:

views:

160

answers:

1

Is it possible for the eventClick to happen on a double click rather than a single click? I know of ways in which I can do this but is there an elegant way of doing this using this plugin without changing the core?

Thanks Steve

+1  A: 

Yes, it is possible. You should modify the plugin. You need to modify the event handlers such as:

    eventElementHandlers: function (event, eventElement)
    {
        var view = this; 
        eventElement
        .click(function (ev)
        {
            if (!eventElement.hasClass('ui-draggable-dragging') &&
                !eventElement.hasClass('ui-resizable-resizing'))
            {
                return view.trigger('eventClick', this, event, ev);
            }
        })
        .dblclick(function (ev)
        {
            return view.trigger('dblclick', this, event, ev);
        })
        .hover(
            function (ev)
            {
                view.trigger('eventMouseover', this, event, ev);
            },
            function (ev)
            {
                view.trigger('eventMouseout', this, event, ev);
            }
        );
    },

You can add in the same way more events. Here you can find the list of events that comes with jQuery. For right click and some other event there are plugings.

Teddy