Originally I had
targetWater.animate({
"width": "+=100%"
Now I want to dynamically use "width" or "height"
var direction = (targetWater.hasClass('x'))? "width" : "height";
targetWater.animate({
direction: "+=100%"
But this doesn't work.
I've tried
direction.toString()
and
''+direction+''
No joy with this either
var anim = { direction: "+=100%" }
targetWater.animate(anim,