That did it. Thank you so much! I've been trying to escape the colon using one slash :p
Thanks again! - Nick On Jan 7, 3:08 pm, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote: > Try escaping the colon: $("#itemForm\\:standards select:last") > > Cheers, > -Jonathan > > On 1/7/08, npetcu <[EMAIL PROTECTED]> wrote: > > > > > I'm updating some of the legacy software we have at my company and > > changing much of the JavaScript to jQuery. I'm having a bit of > > trouble with a few particular id's however. > > > I'm trying to access the last select element of a block of code and > > retrieve the id like this: > > > $("#itemForm:standards select:last").attr("id"); > > > itemForm:standards is the id of the block I'm attempting to access, > > and I'm using select:last to get the last select element. This > > doesn't work however. I tried the same method, but used the class > > name rather than the id and the function worked fine. > > > $(".standardsBlock select:last").attr("id"); > > > I may be mistaken, but I think jQuery thinks I'm attempting to apply a > > selector to the id name because of the colon in the name. How would I > > go about searching for an id like that? Has anyone had any trouble > > with this before? > > > Any help would be much appreciated. > > > -- npetcu