Skip to content

Instantly share code, notes, and snippets.

@g0t4
Created April 15, 2013 03:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save g0t4/5385549 to your computer and use it in GitHub Desktop.
Save g0t4/5385549 to your computer and use it in GitHub Desktop.
knockoutjs binder for jquery elastic plugin
require(['knockout', 'jquery.elastic'], function (ko) {
ko.bindingHandlers.elastic = {
// todo probably should make this destroy when the element is destroyed.
update: function (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {
$(element).elastic();
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment