Thank you for your reply.
I know that I could write options directly in the button call.
But I would like to use the var instead, because I would like to set the options, depending on other classes.
something like that:
- var options = new Object();
- var button = $('.button');
-
- if(button.hasClass('no-text') ) {
- options.text = false;
- }
-
- if(button.hasClass('ui-icon-pencil') ) {
- options.icons = {primary: 'ui-icon-pencil'};
- }
- button.button('option', options);
Now i would have a very flexible way to create buttons...