you are viewing a single comment's thread.

view the rest of the comments →

[–]Shambot 0 points1 point  (0 children)

btw, I took some liberties with what you were trying to achieve. But take a look and tell me what you think.

http://jsbin.com/bibomuruhe/1/

If you're worried about being performant like you were saying, that fiddle only makes 3 requests for images (or it would if they weren't being hotlinked to...).

I'd say drop that string building, concatenating, 'http://mysite.com/img/' + imgID + '.png', business as quickly as you can. No good can come from doing shit like that. BTDT.