Well im developing a knockout.js application and wonder where to put the animation functions if i do not want to keep them in the model(this does not seem like the correct place to have them)…
Well im developing a knockout.js application and wonder where to put the animation functions
Share
Nothing is stopping you from referencing functions outside your model. Knockout looks to the viewmodel first, but will look to the global context if it doesn’t find anything.
HTML:
JS:
Here is a fiddle demonstrating that this works.