Created
July 8, 2015 13:42
-
-
Save redwraith2/c045711b2ef25fe3b347 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#When using UI Hooks, the docs will tell you to do it like this: | |
#This is wrong, but will work unless you are doing something that involves positioning. Namely autoscrolling behavior. | |
@find('#container')._uihooks = { | |
insertElement: -> | |
$(node).insertBefore(next) | |
#I researched how MDG does inserts themselves. They do it more like this: | |
#This works without an issue if you've implemented autoscrolling on this collection via template-level subscriptions. | |
#This is because this uses DOM insert rather than JQuery. | |
#It also, unfortunately, requires an additional piece of information - though one you likely already have! $('#container') | |
$('#container')[0].insertBefore(node, next) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment