Small questions about parent () and siblings () in jquery _jquery

Source: Internet
Author: User

Today I found a small problem, and now I do not know which is the stem in the end, but the feeling is the parent () and siblings () one of them.

That's what I wanted to do. Delete the selection according to the conditions you enter:

Demo

<!
DOCTYPE html>  

There's no problem with this one:

Search conditions for existence: "Coidng" (below) content, in the browser is also a solid display.

<script>
$ (function () {
var coding = "coding";
var coding=coding.touppercase ();
$ (". Bolsearch"). Hide (). Filter (". Bolsearch:contains (" +coding+ ")"). Show (). Parent (). Parent (). siblings (). Hide ();
})

However, when I change the condition to WW11 (as follows), I understand that the last 2 content belonging to WW11 should be shown, but nothing comes out? God horse situation?

<script>
$ (function () {
var coding = "WW11";
var coding=coding.touppercase ();
$ (". Bolsearch"). Hide (). Filter (". Bolsearch:contains (" +coding+ ")"). Show (). Parent (). Parent (). siblings (). Hide ();
})

Then, then change the search conditions, the WW11 to ww11jm031 that is to say this condition is unique, do not repeat.

It's OK, the selection conditions can be shown again.

Then I changed the condition ww11jm031 back to WW11 and

 
 

To

 
 

That's what I want to show. Although the content is satisfied, but the display does not meet my request.

Finally, the way around, the style changed.

But this terrier still does not go around, do not understand why can only filter out the only condition.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.