Reputation: 283
I'm trying to construct global vars inside of jQ .each(). I get 'invalid left-hand side in assignment' error...
'prefix_' + $(this).attr('id') = $(this).method();
Upvotes: 0
Views: 19
Reputation: 3328
window['prefix_' + $(this).attr('id')] = $(this).method();
Upvotes: 2