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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:00:51+00:00 2026-05-23T09:00:51+00:00

We all know that there are many different selector combinations one can use to

  • 0

We all know that there are many different selector combinations one can use to create a unique wrapped set of jQuery elements.

Does a tool (plugin, extension, etc) exist that allows the user to visually click on any section of the DOM (similar to Firebug’s inspect feature) and auto-suggests relevant potential selectors that match that element?

The tool would have internal knowledge of jQuery selectors (CSS selectors fall short) and would take into account the surrounding elements + the DOM to provide 10-20 helpful selector suggestions.

  • 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-23T09:00:52+00:00Added an answer on May 23, 2026 at 9:00 am

    Here is a start point to play around with what you need (i hope) or just to understand:

    JSFIDDLE DEMO

    $("body").click(function(event) { // if you are not interested on 'body' himself use: $("body>*")
    
        // QUESTIONS:
        var Q_qwer = 'Not a parent';
        var Q_children = 'Not a children';
        var Q_last = 'Not last';
        var Q_first = 'Not first';
    
        //#
    
        if ($(event.target).children().size() > 0) {
            myChildren = $(event.target).children();
            var Q_parent = myChildren[0].nodeName + ' (ID: ' + myChildren[0].id + ' || CLASS: ' + myChildren[0].className + ' )';
        }
        if ($(event.target).parent().size() > 0) {
            myParent = $(event.target).parent();
            var Q_children = myParent[0].nodeName + ' (ID: ' + myParent[0].id + ' || CLASS: ' + myParent[0].className + ' )';     
        }
        if ($(event.target).is(':last-child')) {
            Q_last = 'LAST!' ;      
        }
        if ($(event.target).is(':first-child')) { // or use: $(event.target).index() == 0
            Q_first = 'FIRST!' ;     
        }
    
        $("#log").html(' event.target: ' + event.target +
                       ' <br> nodeName: ' + event.target.nodeName +
                       ' , Tag: ' + event.target.tagName +
                       ' <br> ID: ' + event.target.id +
                       ' <br> Class: ' + event.target.className +
                       ' <br> Href: ' + event.target.href +
                       ' <br> Value: ' + event.target.value +
                       ' <br> Children of: ' + Q_children +
                       ' <br> Parent of: ' + Q_parent + ' (First children)' +
                       ' <br> Last children?: ' + Q_last +
                       ' <br> First children?: ' + Q_first +
                       ' <br> .index( ' + $(event.target).index() + ')' +
                       ' <br> .eq( ' + $(event.target).prevAll().length + ')' +
                       ' <br> <hr>' + $(event.target).html()
    
                      );
    });
    

    Hope this helps!

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

Sidebar

Related Questions

I know that there are many different architectures exist. In this question I consider
First of all: I do know that there are already many questions and answers
I know that there are many posts about this on Stackoverflow, but this one
First of all... Sorry for this post. I know that there are many many
Are there any open-source libraries that all programmers should know about? I'm thinking something
We all know that RAW pointers need to be wrapped in some form of
We all know that you can overload a function according to the parameters: int
Folks, we all know that IP blacklisting doesn't work - spammers can come in
It's my first question on SO. I know that there were many topics on
I wrote some classes that I use with many different projects. For example, I

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.