Why happen this with buttons

Why happen this with buttons

Hi every:
I'm trying to use Buttons Widget following every as docs said but I'm getting problems when it's showed. The HTML is as follow:
  1. <div class="buttons">
  2.  <button onclick="$('#form').submit();"><?php echo $button_save; ?></button>
  3.  <button onclick="location = '<?php echo $cancel; ?>';"><?php echo $button_cancel; ?></button
  4. </div>
And the jQuery code is this:
  1. $(".buttons button:first").button({
  2.         icons: {
  3.             primary: "ui-icon-check"
  4.         }
  5.     }).next().button({
  6.         icons: {
  7.             primary: "ui-icon-close"
  8.         }
  9.     });
If you see the attached image you will see what I speaking about. Can any help me?