Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Move multiple elements #34

justnorris opened this Issue · 1 comment

2 participants


First off - thank you for this - an awesome library.

I've found a single inconvenience and right now I can't think of a good solution on my own, so I'm here for help rather than an actual issue of move.js

offset = * -1
move('#stage').y( offset ).end()
move('#header').y( offset ).end()

I would rather do

move('#stage, #header').y(*-1).end()

I've already added a custom selector engine ( jQuery ), but .get(0) gets only a single element. Is there a way around this ? Maybe it's on the roadmap to support multiple elements ?


the problem with multiple elements is that you rarely need to animate them the same way,
you can easily do selectors.forEach(function(s){ move(s).y(10).end(); });.

i think the only way to make multiple element support useful is to
join data binding to elements like d3 does:

.join([....]) // <= data ({ x: N, y: N })
.y(': y * i')
.x(': x * i')

i'm keeping this open just in case more people need it.

@yields yields closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.