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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:18:13+00:00 2026-06-11T20:18:13+00:00

Having this html: <div><h1>1</h1></div> <div>2</div> <div><h1>3</h1></div> This is returning 0: $(div).filter(:not(:not(:has(h1)))).length I’ve made some

  • 0

Having this html:

<div><h1>1</h1></div>
<div>2</div>
<div><h1>3</h1></div>

This is returning 0:

$("div").filter(":not(:not(:has(h1)))").length

I’ve made some testing here and the first two selectors are ok (without any filtering, and then just with one not).

This is a simpler model than my code. I really can’t avoid both not’s because one is added by a plugin and the other is being received in its options.

  • 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-11T20:18:14+00:00Added an answer on June 11, 2026 at 8:18 pm

    Don’t know why this is happening but it got fixed on version 1.8. Here is the same code with jQuery 1.8 working.

    If you can’t change your version for some reason one workaround is changing the .filter for .not. Here it is working.

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

Sidebar

Related Questions

I'm following this tutorial http://www.vogella.com/articles/AndroidIntent/article.html for having some data transfered to parent activity by
Hi I have this HTML code <th scope=col class= style=width: 13px;> <div class=some-handle></div> <a
I'm having trouble selecting the input value from this html: <li class=t-item> <div class=t-mid>
I am having a html file containing a div tag. While viewing this html
Having this piece of HTML: <div id=modal> <select class=country> <option value=></option> <option value=opt>Opt</option> </select>
Here is my question. I am having this simple menu. <div id=menu> <ul> <li>
Having this html: <div id='hi1'> aaa </div> When doing: $('#hi1').sayHi(); I would like to
Question: I'm having a little trouble with jQuery: Consider this HTML, where I want
I'm having a good old play with Redis Webdis Dart I wrote this #import('dart:html');
I am having trouble copying text using zeroclipboard. This is my html code: <dl

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.