Joel Birch schrieb: > I thought the switch 'smelled' less that an eval would :) . Hey, this > could be a good place for Jörn to prove his point and suggest how > this could be refactored to avoid the switch :D
Some more about switch - I really think it's alright to use: "Switch blocks should always be used where possible, as it's so much faster than an if—else series. This is because with the if else statements, a test must be made for each "if" statement, whereas switch blocks generate vector jump tables at compile time so NO test is actually required in the underlying code!" http://www.devwebpro.com/devwebpro-39-20030514OptimizingJavaScriptforExecutionSpeed.html -- Klaus _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/