Reputation: 3476
Are you able to place a variable into attr of src?
Example:
$("#member-image2").attr({src : image});
I am using facebook connect and the "image" is their variable and "member-image2" is my img ID ..
Is this even possible? Because as is, it is not doing it.
Upvotes: 1
Views: 5049
Reputation: 3476
Solved:
$("#member-image2").attr({src : ''+image+''});
Had to just trick to be a string..
Upvotes: 1
Reputation: 237
yes you can, but what does the image var say if you alert or log it ?
Is it a valid url ?
Upvotes: 0