Post Archive

› March 25, 2003

Javascript class and selector fetching

  • Reported by Nate

Interesting scripts that I imagine could be quite useful for a number of purposes:
getElementByClassName from Mooncalf
and
getElementBySelector from Simon.

Comments

1. March 26, 2003 06:44 AM

Quote this comment

liorean Posted…

Time to contribute... [snip] <Nate> This comment had a large chunk of code, I thought it needed more room, so I put it here. </Nate>

2. March 26, 2003 07:34 AM

Quote this comment

Nate Posted…

Liorean, this layout is not well equipped to hold a wide block of content - it's one of the more important reasons that the templates here could use some work. Hope you don't mind your code being moved around.

3. March 26, 2003 08:18 AM

Quote this comment

liorean Posted…

Hey, it's your page, you move around thing as to make it look the best possible. In fact, I thought it looked a tad bad, but I couldn't think of any good way to reformat it to fit...

4. March 26, 2003 09:04 AM

Quote this comment

Nate Posted…

Yes, that's just the problem, this layout could use some work. Also would be a good idea to have a [code] style. And a larger comment entry box. The list goes on. Perhaps April would be a good time for a redesign.

5. March 27, 2003 08:09 AM

Quote this comment

Simon Willison Posted…

I've added support for attribute selectors to getElementBySelector now - it can return elements matching queries like [title*="permalink"] (all elements with a title attribute that contains the string permalink) among others.

6. April 6, 2003 10:33 PM

Quote this comment

Dave Posted…

I know I'm getting in on this a little late, but for what it's worth, here's my contribution