An eval(), in this case, shouldn't be needed (this is based from experience and not tested). When you would run the code:
The eval() would create:
where el would be evaluated out to it's value. Then, from there, it would be run in a setTimeout() (which would need the absent quotation marks), so it wouldn't work. However, you could run:
Which would work, but so would his original code (atleast it should).
WIth the original code, it looks like you're passing the layer object, rather than the layerID, but if you were passing the layerID, you would need to surround it with strings, like: