insertAfter and insertBefore were overriden in the function EndlessScroll.prototype.setInsertPositionsWhenNecessary since we are using default to check if insertAfter and insertBefore are provided. We should be checking for options.insertAfter and options.insertBefor
When integrating the Plugin, I faced an issue that my content was not getting replaced at the position mentioned in the configuration
$('#scrollableList').endlessScroll({ fireOnce: false, inflowPixels: 1, insertAfter: '#scrollableList div:last', insertBefore: '#scrollableList div:last', loader: '' });
insertAfter and insertBefore were overriden in the function EndlessScroll.prototype.setInsertPositionsWhenNecessary since we are using default to check if insertAfter and insertBefore are provided. We should be checking for options.insertAfter and options.insertBefor