I am trying to animate specific HTML elements based on a number of clicks the user makes using jQuery.path.The problem I'm having is that I'm not sure of the best way to select the parameters that are relative to the chosen element.Here is my current code:\[code\] var segment1Params = { start: { x: 414, y: 121, angle: 358.156, length: 0.300 }, end: { x: 114, y: 121, angle: 0.229, length: 0.704 } } var segment2Params = { start: { x: 494, y: 104, angle: 358.156, length: 0.300 }, end: { x: 114, y: 121, angle: 0.229, length: 0.704 } } var segment3Params = { start: { x: 420, y: 306, angle: 358.156, length: 0.300 }, end: { x: 114, y: 121, angle: 0.229, length: 0.704 } } var segment4Params = { start: { x: 514, y: 389, angle: 358.156, length: 0.300 }, end: { x: 114, y: 121, angle: 0.229, length: 0.704 } } var segmentSelected = 1; $('body').click(function () { segmentSelected += 1; //the amount of user clicks $("#segment-"+segmentSelected).animate({path : new $.path.bezier(segment1Params)}) if (segmentSelected == 5) { segmentSelected = 1; //reset the amount of user clicks (looping) } });\[/code\]Ideally I would want the line...\[code\]$("#segment-"+segmentSelected).animate({path : new $.path.bezier(segment1Params)})\[/code\]...to select the correct set of parameters.I am thinking this can be done with an array but syntactically I am unsure on the best approach.