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


ADVERTISEMENT

Parent Child Checkbox - Only Same Name Of Child And Parents Should Be Unchecked

Oct 28, 2010

I have created parent child checkboxes. When one child is selected, then parent of that child, other child of same name and parent of that same name's child will be selected... Now I want if I unchecked any child, then only same name of child and parents should be unchecked or if I unchecked Parent Child, then same name of parent and child will be unchecked.

[Code]...

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

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

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

JQuery :: Select The 2nd Child Of A 'closest' Parent?

Jul 19, 2010

I am trying to figure out the syntax for the following. For this version I am simply trying to select the 2nd child of the SLIDE HOLDER div. For this test I am just making the width grow. My next pass will be to get the index of the DOT clicked and then pass it to the child of the other parent. Please see line 24. I know this is incorrect but placed it to give you an idea of what I am trying to accomplish.

[Code]...

View 4 Replies View Related

JQuery :: Change Parent Div Height After Child?

May 29, 2009

I have the following layout.

.panel
{
position:relative;
width:580px;

[Code]....

The parent (class="panelContent") div contains a child element that is generated/rendered last. This makes the child element #ReportViewer1 overlap the parent (class="rptViewer"). Can I jQuerytize the parent div to adjust it's size after the child renders so it is contained/displayed in the parent?

View 3 Replies View Related

JQuery :: Get All Child Control ID Or Attribute Or Tag Name In Parent Div

Mar 25, 2011

I have a Div control d1and in this div I have furter div and span control.I want to get a list of all element in an array.

<div id="d1">
<div>
<div id="h1">
<div id="h2">

[Code].....

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

JQuery :: Trigger A Event In Parent On Clicking Child?

Aug 18, 2011

I need to click on a child element and trigger an function in the parent, but know when i enable it both child and parent are getting executed.As you see in the attachment photo when I click the flip page icon the T-shirt should hide and create a description on T-shirt.

View 3 Replies View Related

JQuery :: Transfer Data From Child To Parent (Modal)?

Jun 1, 2011

I have two pages parent.html and child.html, the parent has a link called "Search", when clicked the child open in a modal centered window that has a search form, the search in the child return a list of rows, so when clicking a row the child window close and data is transferred to the parent.

View 1 Replies View Related

JQuery :: Parent Element Jumps When Child Fades In Or Out?

May 3, 2009

i am curious if there is a simple solution to this very common problemim sure lots get.i have a div with some children items in it and when i fade one ofthem out the div jumps down to the appropriate height. i would like toknow is there a simple way to animate the div to shrink nicely insteadof just jumping to its new size?

View 2 Replies View Related

JQuery :: Trigger Child Link When Parent Is Clicked?

Mar 31, 2011

I want the <a/> in an <li/> to be triggered when the click happens anywhere within the </li>. So given the html...

<ul>
<li><a href="javascript:alert('clicked!')">test</a> <span>some other stuff</span></li>
<li><a href="javascript:alert('clicked!')">test</a> <span>some other

[Code]....

View 7 Replies View Related

Jquery :: Passing Parameters - Parent / Child Templates

Mar 3, 2010

I have little bizarre problem. Working in Java web development we have project that we use plenty of templates from Velocity. Where one template can refresh section of it self and display one or more templates. My problems is that in parent template I have to pop up window with message if in child template and item from group A been moved to group B or vice-versa. How to change on child template can be propagated up to parent?

View 3 Replies View Related

JQuery : Selecting A Parent When A Click Event Is Fired On A Child

Apr 27, 2009

In jQuery, how to select a parent element to a child if I attached a click event on the parent but also want a click event on a child within.

Let's say I have a the following code :

HTML Code:

There may be several of those classes in the page. I then use jQuery to replace the inner HTML to the clickclass div when clicked on with some other code and a input button (with an ID of, let's say 'save_button').

This works fine for that part:

HTML Code:

I then want to have the button clickable so that I can replace again the HTML in the div (like a save button). But if I try a separate event listener on the input button, it also fires the parent event. Even if I return false on the child event or use event.stopImmediatePropagation() in the .click child function.

I've managed to almost get it with the following code :

HTML Code:

If the event is triggerd form 'clickclass', then replace with HTML + input button

The problem is that whenever I try using .parent() with jQuery, it always tells me that parent() is not a function. I've tried various other ways of getting the parent object (the clickclass div) but can't get it to work.

View 4 Replies View Related

Null Or Not An Object - Not Displaying Document.write(...) In Child Modal Window .

Jul 23, 2005

I'm trying to figure out this script doesn't display any text in the
child window and why I'm getting the null or not an object error.
It's taken directly from the Javascript and DHTML cookbook (not listed
in the book errata on o'reilly website). Initially I get an error
"window.dialogArguments.yourName" is null or not an object. Then I
fill out the field on the form, press the button and the child window
does display but there is no text inside the child window.

Questions: Should I be declaring an object that isn't currently
declared like "window"? or is "window" a built in object that doesn't
need declaring? do I need to assign the dialogDoc.html or "result" to
"document" somehow? It looks like they have me putting a value in
"result" then never actually using "result"... confused... Using ie
6.02800...Suggestions? gj


<html>
<head>
<title> Launch a Modal Dialog</title>
<script type="text/javascript">

function openDialog(form){
var result = window.showModalDialog("dialogDoc.html", form,
"dialogWidth:300px; dialogHeight:201px; center:yes");
}
</script>
</head>
<body>
<h1>Internet Explorer Modal Dialog Window</h1>
<hr />
<form name="sample" action="#" onsubmit="return false">
Enter your name for the dialog box:<input name="yourName" type="text"
/>
<input type="button" value="Send to Dialog"
onclick="openDialog(this.form)" />
</form>
</body>
</html>

<html>
<head>
<title>Modal Dialog</title>
</head>
<body>
<script type="text/javascript">
document.write("Greetings from " +
window.dialogArguments.yourName.value + "!");
</script>
</body>
</html>

View 3 Replies View Related

Getting Value From Child To Parent IFrame?

Feb 4, 2009

I have one page which have two ifrmaes, parent iframe contains no of child iframe. Now oncliking child iframe check box, I have to get that value into parent iframe, I managed to create array of parent iframe but can't get child ifrmae's control. I used like this:
document.getelementbyid("iframeparent1).document.getelementsbyname("Check1")
but it doesn't work.

View 2 Replies View Related

Parent And Child Checkboxes

Jun 1, 2005

I currently have populated checkboxes in my form. I would like to write script that by clicking on a parent checkbox it will automatically select the child checkboxes as well.

The current Script I have is only the parent with a name and populated value attached to it. I would like to attach child checkboxes for each checkbox that appears from code below.

<input type="checkbox" name="price" value="<%Response.Write Recordset("price")%>"/>

View 7 Replies View Related

Child To Parent Window Communtication

Jul 23, 2005

I was curious one day and started to explore the whole idea of a
document opening a pop up and that pop up being able to send data, that
was input by the user, back to the parent. Does anyone have expirence
with this?

View 3 Replies View Related

Open Child And Close Parent

Aug 13, 2005

How do you open a new window and closed the parent window. ie click on link and new window opens in place of original window.

Is there some way of combing window.open and window.close?

View 1 Replies View Related

Generic Parent/Child Communications

May 3, 2006

I have 40 or 50 inputs scattered among many pages that all need the
ability to open a popup which allows the user to navigate a file
directory structure, locate a specific file, and return the fully
qualified file name to the parent window input. All the 40 or 50 inputs
have unique IDs. Given any one input ID, I have everything working
perfectly: the parent form opens the popup using
window.open("FileFinder.aspx?dir=" + UserRootDirectory + "&InPutID=" +
IdCodeInOnClick);

Popup talks back to parent using window.opener.document...

Like I said, give me the input field ID and I can make everything work
every time... but it makes NO sense to write 40 or 50 functions, one
for each unique input field. I tried using

window.opener.document.forms[0].getElementByID(InPutID).value

but I keep getting an error message about something requiring an
object. Is there a way to accomplish this? Also, since I'm new to
JavaScript (and web programming generally), is there a good tool for
debugging JavaScript intended for IE?

View 5 Replies View Related

How To Control Child Rows From Parent

Nov 30, 2009

I have a table of data, grouped by Month, Year and then ProjectID:
- Month, Year
- ProjectID
- Job1
- Job2
The Month, Year row controls a collapsable row (ProjectID) and in turn, the ProjectID row controls the Job row(s). The problem I'm having is that if the Job row(s) is open, then 'close' the Month, Year row, the Job row(s) stay visible. How can I control all 'child' rows from the 'parent' Month, Year control?

PHP Code:
<?php
$previousProject = '';
$previousMonth ='';
if ($totalRows_rsInvPending > 0) {
// Show if recordset not empty
do {
if ($previousProject != $row_rsInvPending['projid']) {
if ($previousMonth != $row_rsInvPending['themonth']) {
// for every Project, show the Project ID
?> .....

View 2 Replies View Related

After Open A Child, How To Keep Parent On Focus

Oct 14, 2009

After open a child window, I would like to keep parent window on focus. I tried self.focus(), set new window in blur() as well as setting the setInterval, none of them works in either Firefox or IE. I think this question relates to the opening window in tab rather than in new window.

View 2 Replies View Related







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