Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7051925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:19:20+00:00 2026-05-28T03:19:20+00:00

I am attempting to perform one action when single clicking on an event in

  • 0

I am attempting to perform one action when single clicking on an event in fullCalendar, and perform another action when double clicking on the same event, and am running into problems with the single click event firing on a dblClick.

I want to change the border color on a series of events on a single click, and open an edit dialog box on a double click.

I have tried this in the eventRender function like this but it hasnt worked. Also, leaving the click event out of eventRender and using the eventClick function for single click, it behaves the same way.

        element.bind('dblclick', function(ev) {
            editEvent(event,element,view);
            alert('double click!');
        });
        element.bind('click', function(ev) {
            var eventSeries=$('#calendar').fullCalendar('clientEvents', event.id);
            $(eventSeries).each(function(){this.borderColor='red'});
            $('#calendar').fullCalendar('updateEvent', eventSeries);
            alert('single click!');
        });

dblclick fires fine when there is nothing in eventClick or the click binding, but as soon as I have code in the click binding or eventClick, dblclick never fired. Does anyone know how I can handle both types of events?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:19:20+00:00Added an answer on May 28, 2026 at 3:19 am

    You could roll your own single click / double click event, essentially, using a setTimeout to trigger a single-click event after giving enough time for the user to complete a second click if they’re trying to double click.

    Here’s the fiddle: http://jsfiddle.net/wfG6k/

    $button.bind( 'click', function( event ) {
    
        var doubleClickOpportunity = 200, // Adjust this to whatever feels right
            $elem = $( event.target ),
            clicker = $elem.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 );
            $elem.data( 'clicker', '' );
            $elem.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.
            $elem.data( 'clicker', setTimeout(function() {
                $elem.data( 'clicker', '' );
                $elem.trigger( 'singleclick' );
            }, doubleClickOpportunity ));
        }
    
    });
    
    $button.bind( 'singleclick', function() {
        // I'm a single click!
    });
    
    $button.bind( 'doubleclick', function() {
        // I'm a double click!
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Attempting to use XStream's JavaBeanConverter and running into an issue. Most likely I'm missng
I'm attempting to perform a DML operation against an Entity Framework model, specifically, an
I am attempting to perform a Storyboard segue from a UIbutton that is a
Attempting to insert an escape character into a table results in a warning. For
Attempting to implement a poor man's test of whether a process is still running
I am attempting to perform a perverse memory trick by calculating the size of
I am attempting to perform String Interpolation in C#. The input string I am
I am attempting to have two long running operations run simultaneously in python. They
I'm attempting to perform a link of previously generated .obj files (using the latest
I'm attempting to perform a full outer join on two tables that are not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.