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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:48:22+00:00 2026-06-04T05:48:22+00:00

Here is the JSFidle to the problem: http://jsfiddle.net/LRTh3/36/ $(‘div.boxes’).mousedown(function (event) { // Error on

  • 0

Here is the JSFidle to the problem: http://jsfiddle.net/LRTh3/36/

$('div.boxes').mousedown(function (event) {

    // Error on this line
    var inner_box = $(".box").is(":hover");

    if ( inner_box == true ) {

        alert("blue,gree,pink was clicked");
    }

    else alert("You mousedowned on the red box");

});​

console: Uncaught Error: Syntax error, unrecognized expression: hover 

Works if only one “.box” layer is presented. Is this a bug? How would I fix this?

  • 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-04T05:48:24+00:00Added an answer on June 4, 2026 at 5:48 am
    $('div.boxes').mousedown(function (event) {
    
    // Error on this line
    var $target = $(event.target);    
    if (  $target.is(".box")) {
    
        alert("blue,gree,pink was clicked");
    }
    
    else alert("You mousedowned on the red box");
    
    
    });​
    

    I lifted it from jQuery API doc

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

Sidebar

Related Questions

I've created an example of the problem here: http://jsfiddle.net/JustinN/qWeLT/1/ My actual code is hooked
You can see the example here: http://jsfiddle.net/8EHED/8/ This is a tricky problem because I
Here is a sample fiddle: http://jsfiddle.net/K2zyU/4/ The problem I am experiencing is that the
Here you can see the problem: http://jsfiddle.net/kAQrX/1/ I want the magnifier, search text and
I have a simple script that closes a DIV. An example is here: http://jsfiddle.net/22fTm/3/
Here's the fiddle showing my problem: http://jsfiddle.net/7QaXL/1/ In the webkit-based browsers the padding of
Here is the recreation of my problem http://jsfiddle.net/WsFyV/7/ Select any option from the first
Here is the jfiddle I created to demonstrate the problem: http://jsfiddle.net/ew3nD/ Please edit the
I created a simple demo here that demonstrates the problem: http://jsfiddle.net/boblauer/eCugY/ Basically, I want
I've created an example of the problem here: http://jsfiddle.net/jXLSW/ Notice that when you hover

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.