jupiterjs/jquerymx — Issue #101: It is impossible to revert effect of $.fn.model(m)
Author: Alex-Tracer
Created: 2011-12-09 15:51:10+00:00
State: open

The method $.fn.model(m) does two things:
1. Adds a model instance to $.data(element, "models")
2. Adds a model-specific class to the element

Unfortunately there is no convenient way to undo this. So if we bound a model to element we can't unbind it (and replace with other model).

I think that there should be a method like $.fn.unbindModel(m) that will revert effect of the $.fn.model(m).