Add after/before DOM helper methods. #165

Closed
wants to merge 1 commit into
from

2 participants

@joshuajabbour

Right now appendChild and prependChild give a lot of flexibility in building out the Galleria DOM, but there are some things that are very difficult to do (rearrange just parts of the DOM, or inserting an element between others). Therefore I propose adding two more DOM manipulation wrappers:

  • Galleria.after( siblingID, elementID );
  • Galleria.before( siblingID, elementID );

Technically, this can currently be accomplished directly in jQuery with Galleria.$("myId").after( Galleria.get("myId") ), but that's a bit verbose. Since all of your other DOM tools are nicely wrapped behind Galleria's API, it'd be great to make this work the same.

@joshuajabbour joshuajabbour Add after/before DOM helper methods.
* Galleria.after( siblingID, elementID );
* Galleria.before( siblingID, elementID );
57572ee
@davidhellsing

Sounds like something we could implement without much overhead. Will be considered for the next update, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment