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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:32:35+00:00 2026-05-18T11:32:35+00:00

Is there a way to me do this? <img id=example src=anything.jpg title=something class=abc />

  • 0

Is there a way to me do this?

<img id="example" src="anything.jpg" title="something" class="abc" />

$('.abc').each(function(){

   //test if this result is something
   if( $(this)...(???)...('[src^=anything]')) == 'anything.jpg'){

   }

   //another Jquery selector test for this one    
   if( $(this)...(???)...('#example').size() > 0){

   }


});

This is just an example, what I need is pretty more complex.. But I would like to know if there is a way to make other jQuery selector test in the result of a first selector.. since “find” will find the children of $(this).. and .parent() get alot of brothers..

See what I mean?
Do you have any idea?



So sorry.. let me try again..

$(‘div’).each();

get all “div”, right?

But now in that function I need to make another “test” check if div class is “red” or “blue”..

See?

I need to test something else of the result based in Jquery selector..

I know I could do:

class = $(this).attr('class'); and then if(class=="blue"){} .. But I would like to do $('this[class=blue]').size()>0){}

  • 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-18T11:32:35+00:00Added an answer on May 18, 2026 at 11:32 am

    The jQuery is() filter operates on a found set to detect if something is true or not.

    The jQuery filter() method will further pare down a found set based on criteria.

    var allDivs   = $('div');
    var greenOnes = allDivs.filter('.green');
    var redOnes   = allDivs.filter('.red'  );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider this example: http://jsfiddle.net/treeface/P8JbW/ HTML : <div id=test> <img src=http://ycombinator.com/images/y18.gif /> </div> CSS :
I have some text with images inside it. For example like this texttext<img src=2011-08-15/4/img/123.JPG
the html code : <ul id=top10> <li class=test> <div class=first> <a href=#><img src=01.jpg></a> </div>
I need to display in image on the view this way <img src =
Using jQuery to create new DOM elements from text. Example: jQuery('<div><img src=/some_image.gif></img></div>'); When this
I've got image tags that look like this: <img src=/path/to/my/image.jpg /> But when I
Is there a way that this full-text searching query could be translated from MySQL
There is this way, of course: OuterClass.this . But that's very clumsy. Ideally, there'd
This there a way to remove this check, when a user first accesses my
Is there any way to achieve this effect (3D CANVAS VIEW) for displaying an

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.