Should button be re-entrant?

0 views
Skip to first unread message

Steven Black

unread,
Jan 6, 2010, 9:34:24 PM1/6/10
to jQuery UI Development
I've been experimenting with the new button widget.

Man, what a sweet widget. If you haven't tried it, you're going to
love it.

Question: Should button be re-entrant.

Step 1:
$("#fooAnchor").button( { label : "foo" } ) // makes a button that
says "foo"

Step 2:
$("#fooAnchor").button( { label : "bar" } ) // button still says
"foo" (!?)

My expectation: We should be able to use the .button() interface to
modify a pre-button'd button.

What do you think? Open a ticket?

**--** Steve

Scott González

unread,
Jan 6, 2010, 9:38:37 PM1/6/10
to jquery...@googlegroups.com
This is how all plugins work, and it has been this way for a few years.

--
You received this message because you are subscribed to the Google Groups "jQuery UI Development" group.
To post to this group, send email to jquery...@googlegroups.com.
To unsubscribe from this group, send email to jquery-ui-de...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jquery-ui-dev?hl=en.




Steven Black

unread,
Jan 6, 2010, 10:20:09 PM1/6/10
to jQuery UI Development
Oh, I get it now! This works on pre-initialized button widgets, as
expected.

$("#fooAnchor").button( "option", "label", "bar" );

So does this:

$("#fooAnchor").button("option", {label : "Awesome!", icons :
{primary:"ui-icon-unlocked"}});

Cool!

**--** Steve

> > jquery-ui-de...@googlegroups.com<jquery-ui-dev%2Bunsu...@googlegroups.com>

Reply all
Reply to author
Forward
0 new messages