jquery.collection.js
function (collection, elements, settings, index) {
            for (var i = index + 1; i < elements.length; i++) {
                elements = swapElements(collection, elements, i - 1, i);
            }
            return collection.find(settings.elements_selector);
        }
function (collection, elements, settings, index) {
            for (var i = index + 1; i < elements.length; i++) {
                elements = swapElements(collection, elements, i - 1, i);
            }
            return collection.find(settings.elements_selector);
        }
function ( collection , elements , settings , index ) { for ( var i = index + 1 ; i < elements . length ; i ++ ) { elements = swapElements ( collection , elements , i - 1 , i ) ; } return collection . find ( settings . elements_selector ) ; }
if we create an element at position 2, all element indexes from 2 to N should be increased. for example, in 0-A 1-B 2-C 3-D, adding X at position 1 will create 0-A 1-X 2-B 3-C 4-D
if we create an element at position 2 all element indexes from 2 to N should be increased . for example in 0 - A 1 - B 2 - C 3 - D adding X at position 1 will create 0 - A 1 - X 2 - B 3 - C 4 - D