Solved

Hide Div with Jquery

Posted on 2008-10-30
2
635 Views
Last Modified: 2012-05-05
I have some divs with a class of divoptions

I would like to hide all of the divs with that class and then show one based on ID

using Jquery

How do I do this?
0
Comment
Question by:JonMny
2 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 250 total points
ID: 22844385
try:
$(".divoptions").each(function(){$(this).hide()});
$("#divId").show();
0
 

Assisted Solution

by:Gomez1234
Gomez1234 earned 250 total points
ID: 22844410
or little bit shorter:
$(".divoptions").hide();
$("#divId").show();
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

785 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