Hiding / Revealing Hidden DIVs For Menu

Jan 11, 2010

I am trying to create a basic menu where if you put your mouse over a button you get a bit of descriptive text or an image appearing somewhere else on the page. I have tried to do this with hiding/revealing hidden divs - works fine with IE but no others.

<html>
<head>
<script language="javascript">
var descriptions = new Array();
descriptions[0] = "<p>See whats been added to the web site recently</p>";
descriptions[1] = "<p>Find out more about me</p>";
descriptions[2] = "<p>Check out me links</p>";
function showDescription(descriptionIndex){ .....

View 2 Replies


ADVERTISEMENT

Revealing / Hiding Divs

May 4, 2005

I need to implement a pretty basic javascript functionality in my site, but have never used it and wonder if there is a script available or if someone can give me the basics.
I have a nav bar at the top of the page with four links, and then divs for each of the links. The link you click on displays the associated div and hides the rest of them. Pretty simple, right?

View 2 Replies View Related

Hiding/showing Divs After Selecting Option From <select> Menu

Nov 20, 2009

Basically, I need the script to hide two divs if one of the options in a <select> menu is selected.

Here's the code I've got for the Javascript:
function typeoflisting() {
var selectform = document.getElementById('propertytype');
if (selectform.options[selectedIndex].value == "sell") {

[Code]....

View 5 Replies View Related

Hidden Layers Revealing Themselves

Nov 13, 2001

I'ld like to insert a feature seen in www.k10k.net and www.rangermag.com whereby once a link is clicked it instantly reveals a hidden layer - seems a great way of quick navigation of info.

View 1 Replies View Related

Revealing Content In Floating Divs?

Oct 9, 2011

I'm using a bog standard script which reveals content when something is clicked. This script works fine everywhere else (or it did before I tweeked it a bit to get it to work on this one page; an easy thing to do), however, on this one page, it shows the content, but messes up the layout.

[Code]...

View 4 Replies View Related

JQuery :: Hover And Multiple Divs - All Hidden Divs Are Shown, Not Just The One That Supposed To?

Oct 14, 2010

I have been trying to do some tooltips for a website and desperately wanted to learn something new and do that with jQuery.However, every time a mouse hovers over a tooltip, all hidden divs are shown, not just the one that supposed to. Here's my html:

Code HTML4Strict:
<div class="tip">
<a href="#"></a>[code].....

View 2 Replies View Related

Hidden Revealing Script Doesn't Work - Make The "secret" Div Reappear?

Mar 28, 2009

<html>
<head>
<title>Braxton's Homepage</title>
</style>
<link rel="stylesheet" href="normal.css" />
<style type="text/css">
div#secret{
border: medium double black ;
[Code]...

why this doesn't work! It's supposed to make the "secret" div reappear.

View 2 Replies View Related

Hiding Divs

Jul 23, 2005

I have a page, which looks a bit like this:

....
<body>
<div ID=id1>................</DIV>
<div ID=gsd>................</DIV>
<div ID=ewd>................</DIV>
<div ID=fac>................</DIV>
<div ID=act>................</DIV>
</body>

I would like id1 to be visible at all times, but the other ids only to be
visible one if the time, using something like

<A HREF="#esf" onclick="showdiv('act')">

What would be the best way of doing this?

View 39 Replies View Related

Divs Hiding Under Each Other

Sep 25, 2010

I have this simple checkbox menu [URL]

If you check the cancer box a div will appear. If you check lung, another menu pops up. If you check colon nothing appears because it's behind the lung div. I am aware of z-index. But because a person may go back and forth between menus I need a way to make sure the appropriate div is always on top.

View 3 Replies View Related

Hiding Selected Divs

May 30, 2007

Toggling divs is a popular subject and I have found plenty of information and was able to make it work. There is only 1 thing I am still stuck with for quite some time.

I have a dropdown menu and when I select a date from this menu it displays another select box with times for that day. When I select another date another dropdown is shown with times. The problem is now that my page shows two dropdown menus with times.

The dropdown with dates has several dates, so the dropdowns with times that show increases all the time. The question is how do I hide 1 time dropdown div as I select another one? Code:

View 1 Replies View Related

Hiding/showing DIVs

Sep 29, 2001

I have a dynamically generated page that has a rollover div that needs to be displayed for each of a number of links.

Now, this is easy enough to do on a small scale: as part of the loop that dynamically generates the page, I have a separate hidedivlinkID() and showdivlinkID() function, and it works really well except in NS4.x, which I'm not supporting.

However, once the list of links grows to a certain size--and in this case the list has grown to about 150--the page takes on a rather large size. At this point, it's around 250K.

What I'd like to do is have a single pair of functions in the header script:

function showdiv(linkID) { }
function hidediv(linkID) { }

Such that I can call them easily. The problem comes in at the point where I try to pass the linkID out of the function, into the style-changing parts of the function. To wit:

function showdiv(linkID) {
        linkID.style.visibility = "visible"
        document.getElementById("legend").style.visibility = "hidden"
    } // End showdiv

doesn't work. (The "legend" div is separate and unique; it's not overduplicated). Similarly,

function showdiv(linkID) {
        document.getElementById(linkID).style.visibility = "visible"
        document.getElementById("legend").style.visibility = "hidden"
    } // End showdiv

doesn't work. Is there any way to make this work... or am I stuck with a bunch of extra functions on my page?

View 2 Replies View Related

JS Not Working In IE When Hiding DIVs

Jul 2, 2010

I am trying to let my user hide or show certain div's on a page. I am managing it in Firefox but IE wont do it for me. IE errors saying Object doesnt support the Property or Method? I have dynamic naming for the divs and call the script like so where you see x my array fills in the number index so the div's gets id's like myDiv(0) up to whatever.

Code:
<a href="javascript:showhide('myDiv(<%=x%>)')">Show Hide Div</a>
The Script that gets used is as follows.
Code:
<script language="javascript">
<!--
var state = 'none';
function showhide(myDiv) {
if (state == 'block') {
state = 'none';
} else {
state = 'block';
} if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + myDiv + ".style.display = state");
} if (document.layers) { //IS NETSCAPE 4 or below
document.layers[myDiv].display = state;
} if (document.getElementById &&!document.all) {
hza = document.getElementById(myDiv);
hza.style.display = state;
}}
//-->
</script>

View 11 Replies View Related

Showing And Hiding Divs On Click?

Aug 18, 2009

I would like to know if there is a way to keep the script as is but also add a function to this script so that if a user clicks on another tab (div) the open tab will close on click? Please see code below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>[code].....

View 4 Replies View Related

Showing / Hiding Floated Divs In IE

Jan 4, 2009

I am trying to use JS to change the display.style property of a div from �block� to �none� in order to hide and show it. I find that my code works in Firefox but not in IE. Furthermore, I find that the code works fine in IE if the div I�m trying to show/hide is not floated, but when it IS floated then I�m able to hide the div but unable to re-show it once it�s been hidden. Finally, I find that when the div I�m trying to show/hide is floated left and is the left-most element on the page, it works fine, but when I have another element floated left before it, then it fails to re-show once it�s hidden. Here is my code. In order to solve this problem I have removed all other code form my website, so this is the only code. The HTML:

[Code]...

View 3 Replies View Related

JQuery :: Displaying/Hiding Multiple DIVs?

Jan 29, 2011

Getting myself back into jQuery and have an issue which I didn't previously fix, and was wondering if anyone would be able to assist me. I have multiple DIVs (up to 50 on one page) that I wish to individually be able to hide and close an extra DIV once pressing the 'Details' to show, and 'Hide' to hide the extra hidden DIV.

[Code]...

View 2 Replies View Related

JQuery :: Hiding/showing Multiple DIVs?

Jun 20, 2010

I'm new to jQuery, and I'm having issues with showing my DIVs correctly. The problem with the script at the moment, is that it currently opens up every single .display div, whereas I only want it to open up the one which corresponds to the.input a.edit which I've clicked.

The script hides them individually, displays the hide button and makes the show button display correctly like I wish, but it's displaying all the the .display div's at the same time which isn't what I want. For reference here is my jQuery script:

[Code]...

View 7 Replies View Related

JQuery :: Showing And Hiding Nested Divs?

Aug 6, 2010

i have an html page, in it there is input box

<input type=button id="parambtn" onclick="paramProcess(this);" value=v />

now when we click this button it will show a corresponding div objec, which is the parent div called 'frame1'. this div has two radio buttons "static" and "dynamic".

if the user clicks on static radio selection, i want to show a stDiv. here is the problem as this stDiv is not showing up on click event.the function is getting called as i had checked it using an alert.

if the user clicks on dynamic radio selection, i want to show a dynamicDiv, this is also not working.

this is the code.

<div id="frame1" width="20px" height="50px" style=";display:none;background-color:red;" >
<table>
<tr>

[Code]....

i would also like to add one more problem. right now, when we click on button, it shows the frame Div, but this displaces all the other elements in the page, which are inside a table. is there a way to show this div above other elements without any changes in their position.. i tried to change the z index of the frame Div, but nothing changed..

View 1 Replies View Related

Hiding DIVs Based On Checkbox Selection?

Jun 11, 2010

I'm wanting to hide certain divs within a container. If the sub div DOESN'T have a checkbox which is selected in it, then it should be hidden when you click the link. eg: if #2 and #5 checbox only where selected then divs(sub_1,sub_3,sub_4) would be hidden when link was clicked.

[Code]...

View 11 Replies View Related

JQuery :: Hiding Multiple DIVs When Table Row Clicked

Feb 18, 2010

{foreach key=num item=account from=$accounts}
<div id="info">
<div class="box round">
<table cellspacing="1" class="data">
<tr onclick="javascript: $('#info').hide('fast'); $('#{$account.id}details').slideDown('slow');" style="cursor:pointer;">
<td>{$account.regdate}</td>
<td>{$account.product}<br /><a href="http://{$account.domain}" target="_blank">{$account.domain}</a></td>
<td>{$account.nextduedate}</td><td>{$currencysymbol}{$account.amount} {$currency}</td>
<td><a>View Details {$account.id}</a></td></tr></table></div></div>

I need the info div to hide when the the table row is clicked:
<tr onclick="javascript: $('#info').hide('fast'); $('#{$account.id}details').slideDown('slow');" style="cursor:pointer;">
This is what I'm using to hide it. But because I have multiple divs called info that I need hidden it is not working currently its only hiding the first div called info.

View 1 Replies View Related

JQuery :: Hiding/showing Divs - Hide The Currently Shown Div And Then Slide In The Div Associated With The Button Clicked?

Oct 7, 2010

I awhen it comes to "developing" jQuery but I am trying to do something that is seemingly something simple but I can't for the life of me, figure out the best way to do it.

http:[url].....

Here, you'll see the area below the navigation that has five buttons which are supposed to help scroll between the five associated divs.All I want to do is hide the currently shown div and then slide in the div associated with the button clicked.http:[url].....Here is what the animation is SUPPOSED to look like but the problem is is that the correct one uses Prototype and I am trying to use only one library and jQuery is the most suitable because I use it for other effects in the site and jQuery and Prototype obviously don't mesh well.

View 3 Replies View Related

JQuery :: SlideToggle Open One Of Two Hidden Sub-nav Bars When Either Of Two Different Menu Items Are Clicked Upon - Instead Of A Drop Down Menu

Oct 26, 2009

The purpose of the code is to slideToggle open one of two hidden sub-nav bars when either of two different menu items are clicked upon - instead of a drop down menu. What doesn't work is the hiding of the div that is not required, if it is already open. Viewing in firebug shows that the appropriate classes are being applied - I suspect the reason is that slideToggle has been somehow set and cannot be unset via another object - but perhaps that is not it at all?

$(document).ready(function() {
//add .toggle function to appropriate li element
$('#hozmenu li:nth-child(4)').toggle(function () {
//set 4th menu links colour to be green whilst div is shown
$('#hozmenu li:nth-child(4) a').css('color', '#95d890');
$('#toggle_nav_services').removeClass('toggle_show');
[Code]....

View 1 Replies View Related

Cycling Through Hidden Divs ?

Jul 5, 2009

I posted here a couple days ago and got help from a really nice forum member to get my script working. Now I'm a little embolden by the good experience and am trying to be a little more ambitious. As usual, I ran into a little brick wall on my own and need a shoutout for more help.

Here is what I have so far - a main panel where different image/texts are held in 'panel' div containers within another div container, under which is a nav bar consists of thumbnail images/links. Upon onclick on one of the thumbnail images, the 'panel' div containers are set to display:block or none, effectively 'switching' the panels.

Here is what I am trying to build on top of that - ability to set one of the panel div as 'display:block' at start (right now nothing show until one of the thumbnails is first clicked), and a mechanism to cycle through the different panels via a timer (interruptable via the onclick to show/hide command).

Here is my code so far:

View 10 Replies View Related

Hidden Divs And Error Checking

Oct 11, 2005

I have a form that displays various hidden divs if a visitor checks a certain option in my form. For example, if they select Yes in a radio button a few more form fields will appear beneath it. It works fine except when the form is not filled out properly and the form is displayed again (using PHP). When the page reloads it doesn't show the hidden div unless they select No.

how to make it so if they select Yes, it will make the div appear again when the page reloads? Here's the code I'm using: Code:

View 6 Replies View Related

How To Get Hidden DIVs Appear At Certain Time Intervals

Oct 5, 2010

I have a several hidden AP Divs. I would like them to appear at certain timed intervals.

View 1 Replies View Related

JQuery :: Test/filter For All Divs Being Hidden?

Jun 10, 2009

I am a beginner to jquery/javascript and I am trying to use ascript I saw online to replace the content of a div. However I wouldlike to have the script start with none of the target content showing.So far it starts correctly however I am not sure how to test/filterfor ALL the divs in #content being hidden which would be the beggingstate of the page.Here is a link to what it is doing now.Here is the code

<script type="text/javascript">
$(function(){
$("#home-button").css({

[code]....

View 4 Replies View Related

Hidden Divs Are Showing On Page Load?

Jun 19, 2011

when the page is loading all the hidden divs are coming up first and then it gets hidden.

The problem is I can't use display:block in css file..Is there any other way?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved