I want to have a moving image and a text that moves too. So when I move the image, the text moves too as one!! How do I do this? I have made the image move with this code but how do I add the text??
var R = Raphael("hello_world", 800, 800),
elipse = R.image("mioo.jpg",100,200,100,300);
var start = function () {
this.ox = this.attr("x");
this.oy = this.attr("y");
this.animate({r: 70, opacity: .25}, 500, ">");
},
move = function (dx, dy) {
this.attr({x: this.ox + dx, y: this.oy + dy});
},
up = function () {
this.animate({r: 50, opacity: .5}, 500, ">");
};
elipse.drag(move, start, up);