Solved

jquery not selector

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

Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

Question has a verified solution.

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

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…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
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…

717 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