jquery-traversing Questions

8

Solved

Is there a way to easily do nextUntil, so that the element matched by the selector is included? I have this, which is only fine if there is a previous sibling: $("#content").find("h3:first").prev(...
Conferral asked 2/3, 2012 at 19:32

4

jQuery code: $(document).ready(function() { $('#s-results').load('get_report1.php').show(); $('#search-btn').click(function(){ showValues(); }); $(function() { $('form').bind('submit', functio...
Cottony asked 27/7, 2014 at 6:31

8

Solved

TL;DR: How do I get an action like find(), but block traversal (not full stop, just skip) for a certain selector? ANSWERS: $(Any).find(Selector).not( $(Any).find(Mask).find(Selector) ) T...
Shammer asked 11/6, 2014 at 9:35

5

Solved

Lets say I have a jQuery object/collection stored in a variable named obj, which should contain a DOM element with an id named target. I don't know in advance if target will be a child in obj, i.e...

5

Solved

I have a simple js script that counts the number of children an unordered list has. I'm trying to change the script so it doesn't count any children (li) which contain a div with the class 'hiddenI...
Imbricate asked 8/2, 2013 at 9:7

1

Solved

I am both adding and removing table rows with jQuery. I can add rows easily, but am having trouble removing ones that were created. You can view the page in action here: http://freshbaby.com/v20/w...
Chromaticness asked 27/2, 2013 at 3:26

3

Solved

previously i checked whether a row is last row in a table like this in a condition: $row.is(':last-child') which works fine. Now, i have a requirement where some of the rows in the table are hi...
Subliminal asked 5/11, 2012 at 15:15

1

Solved

I need something in-between the functionality of .closest() and .parents(). I am applying some CSS to all parents of a certain element up to a certain parent. Right now I'm while looping up, but it...
Dys asked 18/10, 2012 at 17:52

2

Solved

Given a 3 by 3 table, i want to add a class to all the cells of 3rd column . I have tried doing $( 'td:eq(3)' ).addclass('special'); $( 'td:eq(5)' ).addclass('special'); $( 'td:eq(8)' ).addclass...
Incandesce asked 11/2, 2012 at 15:50

2

Solved

This is my html : <div id="my_box_one" class="head-div"> <div> <div class="some_box">a</div> <div class="some_box">b</div> </div> </div> I wan...
Marji asked 30/4, 2011 at 12:12

3

Solved

I have some element selected with jQuery selector. It is en element from list of elements with the same class ('my-elements'). Now I'd like to select element containing the selected one which is se...
Kovno asked 4/3, 2011 at 19:20

3

Solved

I'm porting a webapp from prototype to jquery in which I often used the prototype Down() function. (selecting the first child of a given element) Glancing over the JQuery-api one of the ways to do...
Perrault asked 21/10, 2010 at 16:7

1

Solved

Hay, I have some markup like this <div id="some-id"> <h2><a href="#">Title</a></h2> </div> and some jQuery like this $(this).parent().parent().attr("id") ...
Embark asked 13/10, 2010 at 9:2

5

Solved

I have these 4 HTML snippets: Siblings: <div class="a">...</div> <div class="b">...</div> <!--selected--> <div class="b">...</div> <!--not selected--...
Ducktail asked 29/6, 2010 at 13:25

3

Solved

I am disabling a form based on a checkbox... I am having trouble adding the disabled attribute. here is what I got so far: HTML: <table id="shipInfoTable"> <tr> <td>Name:<...
Ergosterol asked 27/2, 2010 at 18:54
1

© 2022 - 2024 — McMap. All rights reserved.