I'm trying to dynamically create this function:
svg.path($('#shape23'),
path.move(333,410)
.smoothC(333,410,333,410)
.smoothC(217.5,415.75,217.5,415.75)
.smoothC(333,500,333,500)
.close(), {fill: '#CCCCCC'});
...with a variable value for the second argument (from path.move to close()):
var myPath = 'path.move(333,410)';
myPath += '.smoothC(333,410,333,410)';
myPath += '.smoothC(217.5,415.75,217.5,415.75)';
myPath += '.smoothC(333,500,333,500)';
myPath += '.close()';
svg.path($('#shape23'), myPath, {fill: '#CCCCCC'});
...but I'm getting a parsing error.
Can anyone help before I tear out my remaining hair?
Try this