As advised here: http://www.w3.org/TR/html401/types.html#type-name
"ID and NAME tokens must begin with a letter ([A-Za-z]) [...]" Which clearly implies that ids cannot be number only. On Jun 24, 1:25 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'd like to add a bit of OT to the discussion, but relating to the $ > function itself. > > Currently, $ wil not return an element, whose id is a number, whereas > getElementById will. > > The fix, as you can imagine, is pretty simple. > I myself just changed the following line: > > if (typeof element == 'string') > > to: > > if (typeof element == 'string' || typeof element == 'number') > > I don't know if this is the most optimized way though. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---
