#1227 new
BPere

selector doesn't return element

Reported by BPere | March 21st, 2011 @ 05:14 PM

The selector doesn't find the element I need.
When I try to search for the input tag and I use as selector "label > span input",
the return is undefined. While it should actually give me the input element.

HTML Block with the html block

<li id="itemid16" class="selected">
  <label class="selectable">
    <span class="inner">
      <div class="checker">
        <span>
          <input type="checkbox" style="opacity: 0;">
        </span>
      </div>
      Work in progress
    </span>
  </label>
</li>

Code to retrieve the INPUT tag.

var li = $("#itemid16");
var el = li.down("label > span input");

The element tag is undefined.

var li = $("#itemid16");
var el = li.down("label > span").down("input");

The element will have a value.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket

Pages