function swap(fromTo, toFrom)
{
var temp = blocks[fromTo];
var templabel = BlockLabels[fromTo];
blocks[fromTo].animate({ x: blocks[toFrom].X }, 1500, ">");
BlockLabels[fromTo].animate({ x: BlockLabels[toFrom].X }, 1500, ">");
blocks[toFrom].animate({ x: temp.X }, 1500, ">");
BlockLabels[toFrom].animate({ x: templabel.X }, 1500, ">");
}
This swap function works in IE9 but not in Chrome. I am using Raphael2.0
updated: http://jsfiddle.net/ZgEty/
chrome and safari not working but IE9 does
Ah… it’s the way you’re accessing x as though it were an object property. Try this instead:
I’ve forked your fiddle as well.