I have an array of users that I get via Ajax when the page loads and I list them using the foreach
binding, like this:
<div data-bind="foreach: { data: usersArr,
afterAdd: showElement,
beforeRemove: fadeRemove }">
I want the list to show up on page load without the fadeIn()
effect I apply to it using afterAdd
and to disappear when I empty the usersArr
array, without beforeRemove
firing.
I only want the effects to fire when adding a new user or deleting an existing one.
Is there a way to achieve this?