?
Solved

jquery not selector

Posted on 2016-10-20
1
Medium Priority
?
39 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 35

Accepted Solution

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

Open in new window

https://jsfiddle.net/kb9uzp3o/
0

Featured Post

WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

Question has a verified solution.

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

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

770 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