JQuery :: Select Which Doesn't Has An Input Child?
Jun 25, 2010
I try to use .not(children('input')) to selectwhich doesn't has an input child, but it doesn't work.
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery-1.4.2.min.js"></script></head>
[Code]....
View 1 Replies
ADVERTISEMENT
Jun 25, 2010
<!DOCTYPE html>
<html><head>
<script src="js/jquery-1.4.2.min.js"></script></head>
<body>
<table width="100%" border="1">
<thead>
</thead>
<tbody><tr><td>
<input type="checkbox" id="del[]" value="1">
</td><td>alert</td>
<td>alert</td></tr>
<tr><td>
<input type="checkbox" id="del[]" value="2">
</td><td>alert</td>
<td>alert</td></tr>
</tbody><tfoot>
</tfoot></table>
</body><script>
$('tbody > tr > td').not(children('input')).click(function(){
alert('Doesn't has an input child!');
});
</script>
</html>
View 3 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 26, 2011
I have 2 windows - parent and children.
in parent
<form name="calc" action="" method="post">
<input value="0" type="text" name="pay" id="pay">
</form>
in child
<form name="payment" action="" method="post">
<input value="0" type="text" name="pay_str" id="pay_str">
</form>
how can i transfer data from parent input to child input?
View 3 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
Jul 14, 2009
I have 2 lists on a page and I have a link set up to remove an li item from the one list. I need to check to see if there is a copy of that item in the other list based off an attribute in my li item called qid. How would I look for a child list item based off this custom
attribute? Assuming I have html like the following and I want to get the one where qid=14.
<ul id="ul1">
<li qid="12" id="ul1_1">adfaf</li>
<li qid="13" id="ul1_2">adfaf</li>
<li qid="14" id="ul1_3">adfaf</li>
</ul>
View 2 Replies
View Related
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
Apr 14, 2010
Let's say I want to select all the input elements of a particular form with id #form. What would be faster?
1. $("#form input")
or
2. $("input", "#form")
In my (rather unscientific) test using firebug, 2 seemed to be almost 50% faster.
View 3 Replies
View Related
Jun 28, 2009
so i'm stuck with a little problem, but couldn't figure it out though. I have the following div
<div aria-disabled="true" class="dropwidget ui-droppable ui-state-highlight ui-droppable-disabled ui-state-disabled" title="blablabla1"> <a href="/msgpics/core/postgres-pages/img/managed43325.tmp" title="" class="preview"><img src="/msgpics/core/postgres-pages/img/managed43325.tmp?thumb" alt="" class="preview"></a> <p>managed43325.tmp<img src="img/remove.gif" class="remove"></p> </div>
and I receive the click on the remove.gif. What I want to do is to get the title attribute of the div around and write it into the <p> tag instead of the name of the file now. I've achieved several selection (yeah i'm new to jquery) but can't figure this one out.
View 6 Replies
View Related
May 12, 2011
I want to do something like this
<div>
<p>
<p class="active">
[code]....
View 7 Replies
View Related
Feb 20, 2010
I'm pretty new at this - been using JQuery about three weeks full-time with good success. But. Some of the elements in my HTML can be selected by their ID's, using the $("#some-id") syntax, and some can't (the selector returns an empty set). In the debugger (Visual Studio) at a break point in the Javascript, I copy the ID value directly out of the html into theimmediate window and run something like to print out the length property of the wrapped set: ?$("#unfindable").length and get zero. I can do the same thing on other ID's and JQuery finds them as I would expect, and Ican't see the difference between the ones that JQuery findsand the ones it doesn't: for instance, they might both be divs. These aren't form input fields - for those I use something like $(":input[id='some-id']") and it works consistently. I don't do anything fancy like changing ID's at runtime - this is all simple static HTML, so I know that the element is there in the DOM and that it has the ID I'm looking for.
View 4 Replies
View Related
Oct 31, 2011
I try to navigate through the cycle slideshow with a select box. This works fine in FF and IE9. But when I open the page in IE8 nothing happens when I click the select box.
This is my code:
$(function () {
$('.slideshow').cycle({
fx: 'fade',
timeout: 0,
[Code]....
View 3 Replies
View Related
Aug 12, 2009
suppose I have the following:
Code HTML4Strict:
<li id="lists">
<a> ... </a>
<li>
[code]....
here it now selects all a tag in "lists" but I only want it to reference the a tag that is the direct child of "lists" li. I want it to ignore the freen highlighted part.
<li id="lists"><a> ... </a><li><a> ... </a>
<a> ... </a>
<a> ... </a></li>
</li>
View 2 Replies
View Related
Jul 22, 2010
I have two multiple selects on my page. One gets updated via ajax whenever the user filters data (we'll call that select "#select-1"), when they select options from that it then gets moved into the other select (we'll call that "#select-2"). That is all working fine but I'd like to refine it so that they can't select the same data twice.
So, basically, what I'd like to do is add logic within the ajax call to only update the select options in (#select-1) if it does NOT exist in the other select (#select-2).
I have no clue where to even begin with this....do I need to store the val's in an array and then search for each one in the other?
View 2 Replies
View Related
Jun 16, 2011
I'm working on a quote generator and I'm running into an issue with onChange events not firing when a text field is dynamically populated via a child window. Here's my setup: I have 3 text boxes (quantity, price, markup) that are multiplied together in order to give the total of that product. Each text box has an onChange event [called calculator()] that calls an external javascript file, which handles the multiplication and instantly updates the total of that product. Up to this point, everything works fine - - when I manually edit any of the 3 inputs, the total updates correctly.
However, my problem is that I now have the "price" text box being dynamically populated, and when it updates it is not firing the onChange event attached to it. The text box is being filled by way of launching a child window and running the following code within it:
[Code]....
View 2 Replies
View Related
Sep 23, 2010
I'm using my custom component that has a combo box (jsf's h:selectOneMenu, which has a onselect event)in it and it already has a onchange event, so I want the onchange event to trigger another onselect event with jQuery and it only works in Firefox.
I tried it without the component and it looks like this:
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript">
[Code]....
and again works only in Firefox, and not IE and Chrome. It works with onblur event, but the onselect is closer to what I need.
Is it not working because the html <select> tag doesn't have a select event but Firefox can do it for some reason?
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
Apr 2, 2003
How can I automatically select the next option from a select box? I would like a next button to scroll through the options.....
View 2 Replies
View Related
Aug 20, 2010
How to select input which have value? I want to count the number.
View 4 Replies
View Related
Aug 31, 2009
How to select input which have value? I want to count the number.
View 4 Replies
View Related
May 17, 2011
sending some new input data with ajax
$('input[type=stufff2]').change(function() {
var allInputs = $(":input");
alert( allInputs.color );
[code]....
View 2 Replies
View Related
Oct 30, 2011
I want to select all inputs that have the same exact values.I want to be able to grab those elements names.
View 5 Replies
View Related
Jan 21, 2011
I am trying to get all my input values from this table:
I am trying to get all the input controls value from "myid_input_tr", anyone knows how ? Should be not very hard.
View 4 Replies
View Related
Apr 1, 2010
I´m trying to select all input button elements with class="button" in a page in order to change their css class. Looking through some examples I managed to come up with the code below, which works perfectly in Firefox 3.6, but for some reason seem to not work on IE7.
$('input.button[disabled=disabled]').attr('class', 'buttonDes'); how i´t could be achieved?
View 1 Replies
View Related
Apr 14, 2011
It shows an input field when the select value is "dropped". The problem I am having is that if I select "dropped" it will display the input field, but if i select a different value AFTER selecting "dropped" the input field is sill displaying. How would I get it to hide the input field if it is NOT selected?
<!--SHOW/HIDE DIV-->
<script type="text/javascript">
$(document).ready(function(){
$('#dropped').hide();
[Code].....
View 2 Replies
View Related