Solved

jquery not selector

Posted on 2016-10-20
1
13 Views
Last Modified: 2016-10-20
I have this fiddle.
I'm using jquery

https://jsfiddle.net/svre0yk3/

If you look this image. I only want to display the divs highlighted in yellow. I want to hide all the other divs.
i only want to display the divs highlighted in yellow
I want to do something like this with the not selector

$("div").not("[id*='DivImageContainer_Span2']").hide();

I was thinking of looking for all the divs that start with "Div_Test_" and end with "_Row1" and then hide all the other divs.

What's the best way to do this?
0
Comment
Question by:maqskywalker
1 Comment
 
LVL 35

Accepted Solution

by:
Terry Woods earned 500 total points
ID: 41852991
This appears to work:
						$("div").not("[id$='_Row1']").hide();

Open in new window

https://jsfiddle.net/kb9uzp3o/
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now