Use type button to avoid undesired submits

This commit is contained in:
Eduardo Lundgren 2008-08-24 23:33:16 +00:00
parent 7d18930231
commit d8dc2ded59

View File

@ -34,7 +34,7 @@ $.widget('ui.spinner', {
.wrap('<div>') .wrap('<div>')
.parent() .parent()
.addClass('ui-spinner') .addClass('ui-spinner')
.append('<button class="ui-spinner-up">&#9650;</button>') .append('<button class="ui-spinner-up" type="button">&#9650;</button>')
.find('.ui-spinner-up') .find('.ui-spinner-up')
.bind('mousedown', function(e) { .bind('mousedown', function(e) {
$(this).addClass('ui-spinner-pressed'); $(this).addClass('ui-spinner-pressed');
@ -73,7 +73,7 @@ $.widget('ui.spinner', {
self._propagate('change', e); self._propagate('change', e);
}) })
.end() .end()
.append('<button class="ui-spinner-down">&#9660;</button>') .append('<button class="ui-spinner-down" type="button">&#9660;</button>')
.find('.ui-spinner-down') .find('.ui-spinner-down')
.bind('mousedown', function(e) { .bind('mousedown', function(e) {
$(this).addClass('ui-spinner-pressed'); $(this).addClass('ui-spinner-pressed');