> I don't know if jQuery already has a way to do this
> (or if anyone else would find it useful), but here's a
> simple extension to call a method (with or with
> parameters) via a string.

Javascript lets you call a method directly with a string:
jQuery["attr"]("id") gets the id for example. Instead of passing a string of
arguments and parsing it you could just eval the attribute in the examples
you gave. Ad-hoc parsing often will get you into trouble; for example the
code you have will not process arglists that have strings with embedded
commas.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to