Raphael setting the attr of an element
I am using raphaeljs add need to set attributes on an element, however the attributes name and value are saved in variables
var attr_name='fill'; var attr_value='#343434';
but the following does not work
however if I type in the actual name in the attr field it works
I have tried wrapping it in quotes and double quotes but this has no effect.
Please can anyone suggest anything? It is not really an option to manually type them in as this code runs in a loop and each time it could be a different attribute it is setting.
Try this -
jQuery Docs - .attr()