Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12520 closed bug (notabug)

click.apply is not a function

Reported by: Backslider Owned by:
Priority: minor Milestone: none
Component: ui.dialog Version: 1.11.3
Keywords: Cc:
Blocked by: Blocking:


I have a simple dialog:

<div id="shippingAddressDialog">
    <p>Would you like to add a separate shipping address?</p>

$(document).ready(function() {
    jQuery('#shippingAddressDialog').dialog({"modal":true,"autoOpen":true,"title":"Shipping Address","width":"400px","buttons":[{"text":"Yes","click":"function(){closeDialog();}"}]});


function closeDialog() {

When the button is clicked it throws the following error (Firebug):

TypeError: click.apply is not a function

click.apply( that.element[ 0 ], arguments );


Browser: Firefox 37.0.2

Change History (2)

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

Resolution: notabug
Status: newclosed

That's because it's not a function, it's a string. Remove the quotes so that click is actually a function.

comment:2 Changed 8 years ago by Scott González

Component: ui.coreui.dialog
Note: See TracTickets for help on using tickets.