Opened 10 years ago

Closed 10 years ago

#5148 closed bug (fixed)

Button docs say there is a click callback

Reported by: vmx Owned by:
Priority: major Milestone: 1.8
Component: ui.button Version: 1.8rc1
Keywords: Cc:
Blocked by: Blocking:

Description

The button docs bundled with 1.8rc1 [1] define a click event. You should be able to set it as an option. The example uses:

$('.selector').button({
   click: function(event, ui) { ... }
});

This doesn't work work for me. But I can bind a function to the click event with bind() as follows:

$('.selector').bind('click', function(event, ui) { ... });

Two test cases are attached. Though I'm not sure if they belong to the events or to the options tests.

Are the wiki docs keep in sync with the bundled docs? In the wiki the click event is missing [2].

[1] http://jquery-ui.googlecode.com/svn/tags/1.8rc1/docs/button.html

[2] http://docs.jquery.com/UI/Button#events

Attachments (1)

ui-button-click-option-test.patch (761 bytes) - added by vmx 10 years ago.
Test case for binding an click event to a ui.button

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by vmx

Test case for binding an click event to a ui.button

comment:1 Changed 10 years ago by Scott González

Resolution: fixed
Status: newclosed
Summary: Button click option doesn't workButton docs say there is a click callback

This was a mistake in the docs that has been fixed. There are no custom callbacks/events for the button plugin.

Note: See TracTickets for help on using tickets.