Skip to content
Browse files

Update src/jquery-ui.unobtrusive.js

  • Loading branch information...
1 parent 939d9d3 commit d41bb68911858293b083a5ba427faa90abf4ed77 Andrew Cohen committed Nov 30, 2011
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/jquery-ui.unobtrusive.js
View
8 src/jquery-ui.unobtrusive.js
@@ -45,8 +45,12 @@
}
});
- // Call jQuery UI fn if it exists
- ($el[fn] || $.noop).call($el, options);
+ // get UI fn if it exists
+ var uiFn = ($el[fn] || $.noop);
+ // call destroy to remove the ui widget
+ uiFn.call($el, 'destroy');
+ // call fn with options
+ uiFn.call($el, options);
});
}
}

0 comments on commit d41bb68

Please sign in to comment.
Something went wrong with that request. Please try again.