button - set multiple options at once
Hi,
i tried to get this code working:
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>Buttons Test</title>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>
- <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" />
- <script type="text/javascript" charset="utf-8">
- $(document).ready(function(){
- var options = new Object();
- var options = {
- text:false,
- icons:{
- primary: 'ui-icon-pencil'
- }
- };
- $('.button').button( "option" , options );
- });
- </script>
- </head>
- <body>
- <a href="#" class="button">Test</a>
- </body>
- </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