My problem is very simple
$(\'#button\').removeAttr(\'type\');
triggers an error on firebug
type property can\'t be changed
you can replace it:
$('#button').replaceWith('');
or use event.preventDefault()
event.preventDefault()