#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: |
Description
I have a simple dialog:
<div id="shippingAddressDialog"> <p>Would you like to add a separate shipping address?</p> </div> $(document).ready(function() { jQuery('#shippingAddressDialog').dialog({"modal":true,"autoOpen":true,"title":"Shipping Address","width":"400px","buttons":[{"text":"Yes","click":"function(){closeDialog();}"}]}); }); function closeDialog() { jQuery('#shippingAddressDialog').dialog("close"); }
When the button is clicked it throws the following error (Firebug):
TypeError: click.apply is not a function
click.apply( that.element[ 0 ], arguments );
jsfiddle: https://jsfiddle.net/a8a46s2y/4/
Browser: Firefox 37.0.2
Change History (2)
comment:1 Changed 8 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
comment:2 Changed 8 years ago by
Component: | ui.core → ui.dialog |
---|
Note: See
TracTickets for help on using
tickets.
That's because it's not a function, it's a string. Remove the quotes so that
click
is actually a function.