button - set multiple options at once

button - set multiple options at once

Hi,

i tried to get this code working:


  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

  6.     <title>Buttons Test</title>

  7. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
  8. <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>

  9. <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/base/jquery-ui.css" type="text/css" media="screen" title="no title" charset="utf-8" />

  10. <script type="text/javascript" charset="utf-8">
  11.     $(document).ready(function(){

  12.     var options = new Object();
  13.     var options = {
  14.                         text:false, 
  15.                         icons:{
  16.                             primary: 'ui-icon-pencil'
  17.                         }
  18.                     };

  19.     $('.button').button( "option" , options );

  20.     });
  21. </script>
  22. </head>
  23. <body>

  24.     <a href="#" class="button">Test</a>

  25. </body>
  26. </html>


But it does not.
If I try to set the options with the var, the button does not work.

Anyone else got this problem?

Regards