JQuery :: Parents Without A Particular Child?
May 26, 2009
I've been staring at code for way too long. I have a data structure like:
<ul id="mylist">
<li class="active">Stuff <a href="#" class="movethis">Move</a></li>
<li class="active">More Stuff</li>
</ul>
How do I get the li that doesn't have 'a.movethis'?
View 1 Replies
ADVERTISEMENT
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
Aug 9, 2009
I have the following code
<tr>
<td><input name="test" type="hidden" value="1" /></td>
<td class="icon"><a href="#" class="delete"><img src="images/action_delete.png" /></a></td>
</tr>
And once the delete button is clicked, I need the value from the input.
$(".delete").live("click", function(){
var id = $(this).parent("tr").children("input").attr("value");
$(this).parent("tr").remove();
});
However, I cant seem to select the input's value.
View 2 Replies
View Related
May 16, 2011
I have the following code. Either of the statementsworks fine in IE8 but not in IE7.
var $parentTabId = $(this).closest("div.column").attr("tabindex");
var $parentTabId = $(this).parents("div.column").attr("tabindex");
I get "undefined" for $parentTabId in IE7. What is the alternative solution which works for both IE7 and IE8 ?
View 3 Replies
View Related
Sep 30, 2011
I have a table with 5000 rows. In each row I have an html element. myElementList is the list of those elements. Now I need to select all the tr's of these elements. I am using the following code.
[Code]...
This work great in FF. But when I run the same in IE 8. The browser hangs out and a popup messgae appears that propmt for to stop the script.
View 2 Replies
View Related
Apr 19, 2010
Is there any way to open the parents to expose a particular node? eg.
$('#my-tree').expandParents('#node-16')
View 1 Replies
View Related
Jun 24, 2010
I have this page where one enters statistics (Goals, Assists) and a function that sums the two and enters the value in a third field TP. I first implemented this function in a pop-up window only with the actual stats table, and it worked like a charm. When I tried to use the same functionality in a table that is placed inside another table and another <TD> tag, it does not work as designed. See problem description further down.
JAVASCRIPT CODE
PHP Code:
HTML AND PHP CODE (that is relevant)
PHP Code:
Problem: Instead of filling the TP field of the actual row, it fills all TP fields on the page, that is for all rows.
HOWEVER, if I remove the top row (<td width="817" bgcolor="white" valign="top">), so that the table is not inside that TD, it works fine.
How should I adjust the script to make it work inside the TD?
View 2 Replies
View Related
Feb 9, 2011
<div class="userbox posts" id="pst146996">
<div class="imgholder">
<img alt="Chris Hardin" src="http://codebix.com/bp/1633.png">
<div style="margin-left: 20px;" class="commentbox">
[code]....
i want already select .postlike in $(this) now i want to select the tagh1 who is in .commentboxelements.i want to change the h1's inside text 1 to 2 so i write the code
$(this).closest('.posts').children('.commentboxelements center h1').html('1');
i try this but it's not worked anyway how i can do this.
View 1 Replies
View Related
Jan 5, 2012
so i wrote this slider with some help from an admin, everything works as I would like it to but I'm trying to make it a plugin so i need to tighten up a certain part of the code:
(function( $ ){
$.fn.jmSlider = function() {
// get total width of all li elements in the slider
var wrapWidth = 0;
[code]....
what i would like to do is instead of using "li:first" and "li:last", i would like to use first-child and last-child so the element doesn't need to be a li, in can be anything that is the direct child of the parent container.
View 2 Replies
View Related
Jan 9, 2011
I would like to create a calculator which can help parents when they calculate their student's school fees on our school's joomla web site. Ive attached our school's fee table.
View 1 Replies
View Related
Jul 20, 2005
I'm trying to determine if a named child window has been opened before
opening a new one, however my challenge is that the child window may have
been opened from a parent that no longer exists, therefore there is no
access to the child window handle. Any ideas?
View 3 Replies
View Related
Aug 22, 2011
i m trying to make a simple nested menu. my problem is when i click on child li's the parent as well as whole menu toggle to hide. i added a class too but its not helping.
Code HTML4Strict:
<script>
$("ul.xoxo>li").slideToggle("slow")[code].....
View 5 Replies
View Related
Nov 24, 2011
I have a difficult work around Jquery. I want to remove all li items from the ul except first li and last three li how to remove the li elements from these list.
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
[Code].....
View 1 Replies
View Related
Jul 23, 2005
I have a parent window that pushes a new window object onto an Array
with the following code :
OpenChild()
{
//totalNumWindowsCreated is global
totalNumWindowsCreated = totalNumWindowsCreated + 1;
childWnds.push(window.open(link, "child" +
totalNumWindowsCreated,"dependent"));
..
..
..
}
This pops up a new window with every call. In the child window I call
a parent function onbeforeunload, appClose() :
function appClose(){
if (window.opener && !window.opener.closed){
window.opener.CloseChild(getQueryString("application"));
}}
This is in my frameset tag of the child code :
<frameset ... onbeforeUnload='appClose()'>
The window.opener.CloseChild() function is called perfectly when I have
one child window open, but as soon as I create another child window
both of the open child windows don't ever call it. They do both go
into the onbeforeunload appClose() function, but do not call the
window.opener.CloseChild() function inside of this routine.
Anyone have any ideas why when I have two child windows open I can't
access the window.opener functions?
I have tried taking each new window out of the array and used the
following code in CloseChild() :
CloseChild()
{
//win and totalNumWindowsCreated are both global
totalNumWindowsCreated = totalNumWindowsCreated + 1;
var win = window.open(link, "child" +
totalNumWindowsCreated,"dependent");
..
..
..
}
View 1 Replies
View Related
May 2, 2010
Lets say I had a wrapped set of <p> elements. I understand how slice could return more than one element, but what is the difference between nth-child() and eq()?
$('p:nth-child(3)').css("font-style","italic");
$("p:eq(2)").css("font-style","italic");
$("p").slice(2,3).css("font-style","italic");
View 7 Replies
View Related
Oct 15, 2011
I am trying to update a progress percentage using jquery in my event handler. The first line works fine. The second line should be the jquery equivilent, but does not work.
event.target.icon.firstChild.textContent = progressPercent
$('event.target.icon').eq(0).text(progressPercent)
View 2 Replies
View Related
Jun 2, 2010
how to find this. I just need to know how to find child elements on a parent element that I already have the object for. The parent node doesn't have an id so I can't just get the ID and use the find functionality in jquery.
View 1 Replies
View Related
May 21, 2010
How can i select immediate children of an element only. Like i have
<div class="widget">
<ul>
<li><a href="google.com">Google</a>
[code]....
View 1 Replies
View Related
Apr 24, 2009
I've got a reference to a TableCell and I'd like to use jQuery to get the first instance of an <IMG> tag within that TableCell, but can't get the syntax right, I understand how it would work if I were to reference the TableCell by and ID or class, but not when I have a direct reference to the cell, I've got:
What the jQuery syntax should be to get the first img tag within "tdRef"?
View 2 Replies
View Related
Nov 8, 2011
I want to create a menu with 10 div in it and each one show one of the div (with the same number):
[Code]...
View 2 Replies
View Related
Apr 7, 2010
This seems like a relatively straight forward problem. I've searced google and these forums. I just want to select this's last child. How do I do that?
View 2 Replies
View Related
Jul 24, 2010
I have a list (simplified version example)
<ul>
<li><a>Grandfather</a>
<ul>
<li><a>Father <span>Desc</span></a>
[code]....
I want to be able to select the span elements that have a sub ul (ie, Grandfather,Father, but not son or daughter. I tried $('#page-ui li:has("ul") span'), which works for the top level nav that doesn't have any children, but shows up for uncle and son and daughter since it applies it to all the spans inside the first li with a sub ul. I also tried$('#page-ui li:has("ul") span:first-child'), but that didn't help either since all the spans are the first childre
View 2 Replies
View Related
Feb 9, 2011
I'm having a problem with selecting only the first child of my content tree. What I have is
<div id="Ft">
<ul class="Ft_colum">
<li><h3><a href="#">Home</a></h3></li>
<li><a href="#">Demo link</a></li>
<li><a href="#">Demo link</a></li>
<li><a href="#">Demo link</a></li>
[Code]...
View 2 Replies
View Related
Jun 9, 2011
I want to automatic calculate the width of a child div. I have a parent with a fixed with and two children in there. The first has a flexible width due to his content (title of post) and is transparent. The second child contains only a background image and should always fill the rest-width. I tried it like this but it doesn't work [code]...
View 3 Replies
View Related
Jan 18, 2010
I'm using the following to sequentially change the background color of some list items. It works, but is there a direct way of putting a variable inside the n-th child parentheses, instead of concatenating? Second question, more CSSey, though. The highlight goes all the way across the page since the CSS bounding box is 100% for the li items. The lines are various lengths so I can't just set the bounding box to, say, fifty percent. Is there a way to use jQuery to make the bounding box, or background color only go to the end of the text?
View 1 Replies
View Related
Jun 19, 2010
If I use an child selector like in [url] how can I prevent it from being applied to all tables?I need to select an child from only one table.
View 2 Replies
View Related