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

  • SEARCH
  • Home
  • 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 9030313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:27:34+00:00 2026-06-16T07:27:34+00:00

Hi I have a few simple buttons which sometimes don’t react. It happens rarely

  • 0

Hi I have a few simple buttons which sometimes don’t react. It happens rarely but I still don’t like it. It happens more if you click very fast or change the navigation very very fast. This is the code I have for them :

$(document).ready(function () { 
    $('[id*=txt]').hide();
    $('[id*=hd]').hide();                   
    $('[id*=home]').show();
    $('#btnhome').css('background-color',"#555");
    $('#btnhome').css('opacity',"0.4");

    $('.button').click(function (){
        $('[id*=txt]').hide();
        $('[id*=hd]').hide();
        $('.button').css('background',"transparent");
        $('.button').css('opacity',"1");
        $(this).css('background-color',"#555");
        $(this).css('opacity',"0.4");
   });          

    $('#btnhome').click(function () {   
        $('[id*=home]').show();             
    });     

    $('#btnabout').click(function () {              
        $('[id*=about]').show();        
    });    

    $('#btncontact').click(function () {        
        $('[id*=contact]').show();  
    });
});

They are only used for showing and hiding the text and they also change the color opacity and so on when they are clicked. When they don’t react nothing happens at all, as if I don’t have any click function defined.

DEMO

^This is what I’m basically using, try hitting them in a random order and switching in a fast way (happens more if you do it fast). You’ll see that sometimes they don’t react. Its a little bit harder to notice because it happens rarely (sometimes more often) so it wont probably happen at first but it sure happens. So give it a try a good few times and you’ll see what I’m talking about. The more fast and random you do it the more it will happen.

  • 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-16T07:27:36+00:00Added an answer on June 16, 2026 at 7:27 am

    After playing with your demo, I noticed that the issue was occurring when clicking a certain place on each button, not by clicking them randomly or at a certain speed. The sweet spot is usually on the right side at the edge of the button text at the padding.

    I found that removing the .button:active{} pseudo-class from your CSS fixes the issue, so my guess is that the shifting of the positioning of the button in the css is interfering with the click event. My suggestion would be to incorporate the removed CSS styling into the click (or mousedown) event itself rather than the :active pseudoclass.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have a few simple buttons which sometimes don't react. It happens rarely
I am creating a simple GUI in C++ which have few buttons in it.
I have made a simple subclass of UIView which has a few subviews but
I have a fairly simple web2py form with a few validators like, IS_FLOAT_IN_RANGE(...) on
I have a few buttons on a page, which when clicked, trigger an ajax
I have a simple webform which have few text fields,leabels and Submit button. When
I have a simple aspx page with a few TextBoxes and a submit button.
I have a few simple scripts that are intended to daisy chain together to
I have written a small makefile for a few simple C programs that compiles
Pretty simple question. I have a few ASP RequiredFieldValdators checking some text boxes. Out

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.