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