I am using angularjs and I have this line of code:
// Get our elements
var elements = angular.element(options.animation.element).children().children();
with this collection I would like to take a certain amount of elements and move them from the end to the front. I tried like this:
var stop = elements.length - options.itemsToShow,
elementsToMove = elements.splice(stop, options.itemsToShow);
elements.unshift(elementsToMove);
but I get an error stating
TypeError: elements.unshift is not a function
Does anyone know how I can fix this?