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
ADVERTISEMENT
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
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
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
Jul 20, 2005
I have a set of data that I display in a table. Each row has a category
and there may be a dozen or more rows in the same category. I'm looking
to add filter buttons to the page to hide/show categories on the fly.
Currently I can: Set the id on the tr to (category name) or to (category
name.data id).
Using the first, is there a way to hide all rows with that same id? It
seems currently to only hide the first row with that id.
If not, is there an easy way to find all rows whose id starts with
(category name)? I figure I could regex over every element in the page
looking for ones that begin with a particular id, but that would be
silly.
Also, is there a way to refer to every row of a table? I'd like to first
hide every row, then show those in the required category.
View 1 Replies
View Related
May 26, 2009
i want to hide my phone numbers in an output page so that the viewerhas to click an icon to see it.i have the following jquery so far:
<!---JQuery test to hide phone--->
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
[code]....
View 1 Replies
View Related
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
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
Feb 16, 2011
This is my FIRST attempt at using Jquery to make a site menu for a client, and I'm pretty new to Javascript as a whole..I have a two column horizontal menu, and when an anchor on the left column is clicked it brings up a list in the right column..how do I hide list in the left column when a different anchor is clicked, bringing the new list to the top of the column?
<style type="text/css">
ul.nobulletnoindent {
list-style-type: none;
[code]....
View 2 Replies
View Related
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
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
Jun 1, 2009
i am trying to make a popup div which will close down after the user clicked outside of it now i am looking for a way to determine if the user clicked outside of the div or not
View 2 Replies
View Related
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
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
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
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
Aug 1, 2009
I need the letter button (the letters of the alphabet) to disappear when clicked, but reappear when hangman game restarts (by clicking start over button). How do I do this?
<html>
<head>
<link rel=stylesheet type=text/css href=layout.css />
[code]....
View 14 Replies
View Related
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
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
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
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
Jan 28, 2011
I am really new to coding and am trying to include a flowchart that I have created on my site. There is a series of 5 questions with 2 possible answers for each question. Can anyone help me with some coding that would let me show only the first question and based on how they answer that, the flow chart would open up to the second question and once they answer the second question, it opens up to the third question and so on?
View 4 Replies
View Related
Apr 15, 2004
I have a form, what I want to happen is that a user clicks a checkbox and a list appears or is enabled so that the user can then select a option. Also when the checkbox is unchecked again, I want the list to disapear or become unabled and it's value set back to whatever was the default.
After a bit of looking around I thought I has done it, but no luck. Can anyone let me know whats going on here? Code:
View 6 Replies
View Related
Oct 23, 2010
I have this demo site here [URL] It's a simple div with overflow: hidden this containing div houses 3 divs each containing different content. The nav at the top scrolls the divs to show the div relating to the nav clicked. The problem I have is with the last btn - Planes. The div containing the planes photos doesn't scroll to the top of the containing div but sits at the bottom. The first two btns. work as expected so I don't understand why the last btn doesn't.
[Code]....
View 2 Replies
View Related
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
Sep 3, 2009
I have a checkbox that when clicked I want to hide all of the entierows in my table where those fields with a class of internalFieldequals True. The hiding part works well but when I uncheck thecheckbox the rows do not become visible again. So I guess my questionis how do I toggle the value of this checkbox (chkInternal) to hide/show these table rows?
<input name="chkInternal" id="chkInternal" type="checkbox" />
<script language="javascript">
$(document).ready(function() {
[code]....
View 1 Replies
View Related