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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:11:14+00:00 2026-06-09T14:11:14+00:00

Using jQuery, I have attached a click event handler to some li HTML elements.

  • 0

Using jQuery, I have attached a “click” event handler to some “li” HTML elements.

The problem is: when I click the “li” element, the event does not fire.

“How?” – will you ask… so, see it by yourself in this simple jsFiddle

Consider:

  • I have tested on Firefox 14.0.1 and Chrome 16.0.912.77 in my Ubuntu system.
  • I have stripped a lot of stuff from CSS, HTML and JS of my original code while “hunting” the cause.
  • You can click in the form label elements to see the event handler function working. But try to click in the li elements… does not work!
  • If you just remove the float: left style from the “li” element, or the position: relative style from the “form”, then the problem disappears!

So, I am not exactly asking how to circumvent or workaround the problem, I am asking why the “click” event does not fire. Is this a bug? A bug from what? Browser? jQuery? CSS? It simply does not make sense to me, and I will love to see an explanation!

Thanks.

  • 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-09T14:11:16+00:00Added an answer on June 9, 2026 at 2:11 pm

    Because the li‘s do float and the form has a position:relative, the form lies above the li‘s, therefore you can still click “Image”

    BTW.:
    If you are using Firebug or Webdeveloper tools you can detect that.

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

Sidebar

Related Questions

I have created tabs by using jQuery API and have bound one event handler
I have a jQuery plugin that needs to register a click event handler: $.fn.myPlugin
I have a JQuery (using JQuery 1.4.2) problem that exhibits only in IE8 in
i have some code using jquery mobile + phonegap and run it on my
I have some tabs using jQuery UI which work just fine, but I want
I have problem while using jquery maskedinput with asp.net textbox. I have a check
I have a form with a submit button. I have attached a click event
I have encountered a very strange problem in using jQuery load() . I used
So apparently I'm trying to do something that jQuery does not like. I'm using
I have a function attached to the div #Browse 's click event that toggles

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.