r3591 committed - Button: prevent following links.
Revision: 3591
Author: scott.gonzalez
Date: Sat Jan 2 15:16:22 2010
Log: Button: prevent following links.
http://code.google.com/p/jquery-ui/source/detail?r=3591
Modified:
/branches/dev/ui/jquery.ui.button.js
=======================================
--- /branches/dev/ui/jquery.ui.button.js Sat Jan 2 08:30:05 2010
+++ /branches/dev/ui/jquery.ui.button.js Sat Jan 2 15:16:22 2010
@@ -138,6 +138,12 @@
} else {
this.buttonElement = this.element;
}
+
+ if (this.element.is('a')) {
+ this.element.bind('click.button', function(event) {
+ event.preventDefault();
+ });
+ }
},
widget: function() {
--