Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Move multiple elements #34

Closed
justnorris opened this Issue · 1 comment

2 participants

@justnorris

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 = App.win.height * -1
move('#stage').y( offset ).end()
move('#header').y( offset ).end()

I would rather do

move('#stage, #header').y(App.win.height*-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 ?

@yields

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:

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

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.