How do I do this (but in a way that works):
$("MyElem").get("[id$='Date']").datepicker();
Essentially I’m trying to select all elements that end with the word “Date” in the id within the context of a given parent element.
So this should be interpreted as:
- Get “MyElem”.
- From “MyElem” search all children recursively and find id’s that end with “Date”.
- For each item in the results of step 2 call datepicker on that element
Why not using
findmethod:Or why not using a better selector: