Solved

jquery not selector

Posted on 2016-10-20
1
27 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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hi all! Recently there was EE question and the person wanted to have a multi-column textbox <div> selection, so as a first step to answer I provided a link but that was not complete with JavaScript selection, but had a good style sheet. So as a ques…
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn how to dynamically set the form action using jQuery.
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)

808 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