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


ADVERTISEMENT

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 :: 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

Displaying The Multiple Divs?

Dec 21, 2009

I have a form with 3 questions and 9 hidden option divs. Questions are answered in radio form and it will be mandatory to answer each question. Depending on which radio in each question is selected, several of the hidden divs will display, once the "Get options" button is selected. Now the code I have already works fine (only tested in IE8), however I'm almost 100% positive that the Options() function can be truncated considerably. In the final form, there will be 36 individual permutations of radios and as you can see with the little example below, the function will get quite large.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

[code]....

View 2 Replies View Related

JQuery :: Displaying And Hiding A Specific Row In The Table?

Jul 23, 2011

When you click the text "info" in the column "comments", a row should be displayed below with text information that is related to the "comments". Need also to click the text "Info" again to hide the text information of comments. Problem: I don't know how to display the row when you click one of the comments with the text "info". When clicking one of the link the remaining rows with the text "info" should not be affected. In order words, the part should be independent Need also some help hiding the text information of comments.

There are some things that you also need to take account to: - The amount of data that will be displayed in the table will be changed from day to day. The data is taken from a xml file.- Would like the sourcode to be written in jQuery.- Only html, css and javascript is allowed in this context.- html code in tr and td will be generated by javscript code.The class "firstDataRow" is the added in the tr row that has the text information of commentsPlease remember that the text hide and show is only for temporary.

// Fullmetalboy
<table border="1" SUMMARY="aaa" id="tblProject">
<thead>

[code]....

View 4 Replies View Related

JQuery :: Safari Displaying/hiding Content?

Sep 28, 2010

I have enabled a hover() event on a DIV that includes an H2 element that is always displayed and a child DIV that needs to be shown/hidden. This code works wonderfully on Firefox and IE. However, it's not working in Safari (I have not tested Opera or Chrome yet)Here's my (very simple) code:

jQuery("div.category-text").css("display","none");
jQuery("div.category-item").hover(
function() {

[code].....

View 1 Replies View Related

JQuery :: Displaying A Child Whilst Hiding A Parent?

May 11, 2010

I have a div (representing a form) with a number of images positioned absolutely within it. The images represent buttons and what I'd like to do is click on one of the images/buttons and the whole form to fade out with the exception of the selected button which merely changes it's opacity from 1 to 0.5 (to remind the user it was clicked). Here's the code I'm using:

$(this).parent().fadeOut("fast");
$(this).stop().css("opacity", 0.5).fadeIn("fast");

However, despite referencing the elements in a number of ways (they have unique id's), every time I run this, $(this) won't show - the opacity is being set but it seems to remain steadfastly invisible whilst the parent div is invisible/hidden - am I barking up completely the wrong tree here ?

View 10 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

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

Displaying An Error Message, Then Hiding It Again

Jul 17, 2007

Ive got a form that is made of <feildsets>'s that when the user clicks submit it will validate the form before submitting it properly.

If an error is encountered it will display an error image and a user friendly error message. This code works fine However, theres a restet button, that when the user clicks it, it should wipe the form, and hide the error message. Code:

View 2 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

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

IE - Menu With A Div Displaying Onmouseover - Hiding Onmouseout

Jun 23, 2011

I have a menu with a div displaying onmouseover, and hiding onmouseout, it works great except in IE if I click on the <select> tag, it triggers the mouseout event, interestingly enough the same does not happen when I click on a text field..

Code Example:

This is obviously not the real code, it's just to give you an idea, I don't think I can post the real code, cuz it's really long and complicated...

I'm using the prototype framework, and I'd like to keep it that way if possible...

View 4 Replies View Related

Hiding And Displaying Forms Based On Selection

Dec 30, 2010

I am trying to display three different types of forms of the same page. One of the three will appear based on the selection. Right now my code has everything shown when you first reload the page and then when you select something it all disappears and nothing comes back. I am trying to use divs because the forms will perform the same action just with different parameters. It is a lot of code but the forms are the same thing just wrapped in a different div and I know they work. hopefully this will cut down on the amount of time you have to look at it.

Below is what I have so far:
Code:
<html>
<head>
<script type="text/javascript" language="javascript">
function choose()
{
document.getElementById('notes').style.display = 'none';
document.getElementById('tests').style.display = 'none';
document.getElementById('homework').style.display = 'none'; .....

View 2 Replies View Related

Hiding And Displaying 2 HTML Tables In The Same Place With DHTML

Jul 23, 2005

I would like to be able to display either one or the other HTML table
in the same place. I.e., there are 2 buttons on the screen. When the
user clicks one button, the table A is displayed below. When the user
clicks the other button, the table A disappears and the table B appears
in the same place.

When I use the classic div tags followed by table code, they are
displayed sequentially on the page, rather than in the same place.

View 1 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

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

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

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

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 View Related

Displaying Divs As Columns?

Aug 25, 2010

So I'm trying to get 3 DIVs to line up as columns horizontally.I've got it to work in some browsers but not all.It's supposed to look like However in some browsers it looks like The code I'm using (Stripped of all the crap) is

<div id="product_col1">
<!--Contents of column 1-->
</div>

[code]....

View 1 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







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