Closed mojavelinux closed 9 years ago
Actually, we can just use querySelectorAll from the parent element to limit the scope.
Let me know if you want the key for the parent to be parent
or container
. I'll update the PR accordingly.
...or whether you'd like to use an array.
Currently, any direct child of the parent element becomes a slide. This is not always the desired behavior. Certain plugins or situations may want to allow child elements to be inserted for auxiliary purposes, or to allow slides to be excluded (an abbreviated presentation). For these reasons, it would be nice if the
from
method allowed both the parent and the child selectors to be specified.I propose that we allow the argument to be an array. The second item in the array is assumed to be the child selector or collection of nodes.
I'd also be open to using a Hash if the Array argument seems to cryptic:
or
If we want to shorten it slightly, we could automatically prepend the container/parent selector the the slides selector so it can be written as:
This would also ensure that they are descendant elements.