Hallo,

I am experimenting jQuery 1.3.1.
In one of my pages i have a simple table (id="tElenco") with different
rows.
Some of these rows have a class named "disabled" (<tr
class="disabled">....</tr>).

I wrote a script that toggle visibility to disabled rows, depending on
a checkbox:

function toggleDisabled(table, isChecked) {
    if (isChecked)
        table.find('tr.disabled').show();
    else
        table.find('tr.disabled').hide();
}

In  jQuery 1.2.6 this script always worked. In jQuery 1.3.1 it has
some troubles.
I tried to compare these two selectors and the results are really
strange.
Here is the console response:

$j('#tElenco tr.disabled')
{...}
    [0]: {object}
    [1]: {object}
    [2]: {object}
    [3]: {object}
    [4]: {object}
    context: {object}
    jquery: "1.3.1"
    length: 5
    prevObject: {...}
    selector: "#tElenco tr.disabled"
$j('#tElenco').find('tr.disabled')
{...}
    [0]: {object}
    context: {object}
    jquery: "1.3.1"
    length: 1
    prevObject: {...}
    selector: "#tElenco tr.disabled"

The first selection returns 5 objects (this is correct!). The second
one returns just a single object, the first of the expected 5.

Why is it happening? Has something changed in new release?

Sorry for my English..
thanks,
Davide.

Reply via email to