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 8587851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:40:10+00:00 2026-06-11T22:40:10+00:00

In the view I have the following class .class{data-id => time.id} At the end

  • 0

In the view I have the following class

.class{"data-id" => time.id}

At the end of the view I enable the live click event

$('.class').live("click", function() {
    window.orc.time.stopCount();
    window.orc.time.whenClicked(#{class.id}, #{class.time}, #    
{class.start});});

In coffeescript i have the following function

time.whenClicked = (class.id, time_dur, time_start) -> 
   ct = time_entries.to_time(time_dur, time_start)
   $("div[data-id=#{time_id}]").addClass "ajax"
   $("div[data-id=#{time_id}]").html("<input id=\"editbox\" size=\"8\" type=\"text\" value=\"#{ct}\">") 
   $("#editbox").bind "keyup", (event) ->
     ...

In the whenClicked function I need the live(“click”) to be disabled. If I try

$(".class").die("click") 

it works, but then the click event will be re-enabled only after I refresh the page, and that’s not what I need.

Is there a solution to disable the click event untill the function is executed?

  • 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-06-11T22:40:11+00:00Added an answer on June 11, 2026 at 10:40 pm

    Don’t disable the handler. Just implement a boolean flag so you know if the method is already running or not. You can then immediately return from the handler in that case:

    var isBusy = false;
    
    $('.class').live('click', function(){
        if(isBusy) return;
        isBusy = true;
        window.orc.time.stopCount();
        window.orc.time.whenClicked(/* some params */);
        isBusy = false;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following model, view and controller. Model public class Person { public
I have a domain data model which returns a class such as the following:
I have the following controller file: <?php class Test extends CI_Controller { function __construct()
I have a virtual table view implementation with the following model: class MyModel: public
I have following view <asp:Content ID=Content2 ContentPlaceHolderID=MainContent runat=server> <h2>Tables <%=ViewData[RetriverName] %></h2> <%using (Html.BeginForm(ResfreshSelectedTables, Home))
I have an ASP MVC view where have the following statement #if DEBUG //section
In my view I have the following code: @using (Html.BeginForm()) { @Html.TextBox(Date2, Model.Date2) <br/>
in a partial view I have the following: <%Html.RenderAction(MVC.User.GetComments(Model.UserGroupName)); %> can I render a
I have following line code in my view: <td> Model.some_instance_method(args) </td> I would like
I have following UI hierarchy Scroll View -->TableLayout-->Rows [each row has TextView+EditText] Problem Inside

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.