Semantic-Org/Semantic-UI · warning
The method you called is not defined
Error message
The method you called is not defined
What it means
invoke() could not resolve an accordion behavior method and logged it via console.error prefixed 'Accordion:'. Valid accordion behaviors include 'open', 'close', 'toggle' (each optionally with an index), and 'destroy'.
Source
Thrown at src/definitions/modules/accordion.js:588
exclusive : true, // whether a single accordion content panel should be open at once
collapsible : true, // whether accordion content can be closed
closeNested : false, // whether nested content should be closed when a panel is closed
animateChildren : true, // whether children opacity should be animated
duration : 350, // duration of animation
easing : 'easeOutQuad', // easing equation for animation
onOpening : function(){}, // callback before open animation
onClosing : function(){}, // callback before closing animation
onChanging : function(){}, // callback before closing or opening animation
onOpen : function(){}, // callback after open animation
onClose : function(){}, // callback after closing animation
onChange : function(){}, // callback after closing or opening animation
error: {
method : 'The method you called is not defined'
},
className : {
active : 'active',
animating : 'animating'
},
selector : {
accordion : '.accordion',
title : '.title',
trigger : '.title',
content : '.content'
}
};
// Adds easing
$.extend( $.easing, {View on GitHub (pinned to 597843ab84)
Solutions
- Check the method name against the accordion behavior API ('open', 'close', 'toggle' with an optional index, 'destroy')
- Confirm the index argument is an integer when using 'open'/'close'/'toggle'
Example fix
// before
$('.ui.accordion').accordion('opne', 1);
// after
$('.ui.accordion').accordion('open', 1); Defensive patterns
Strategy: validation
Validate before calling
var ACCORDION_BEHAVIORS = ['open','close','toggle','destroy'];
function isAccordionBehavior(name, idx) {
return ACCORDION_BEHAVIORS.indexOf(name) !== -1
&& (idx === undefined || Number.isInteger(idx));
}
if (isAccordionBehavior(method, index)) {
$('.ui.accordion').accordion(method, index);
} Type guard
function isAccordionMethod(name) {
return /^(open|close|toggle|destroy)$/.test(name);
} Prevention
- Restrict calls to open/close/toggle/destroy and pass an integer index where required
- Wrap the plugin in a typed helper so invalid methods are rejected at the call site
- Re-check behavior names after a Semantic UI version bump
When it happens
Trigger: A typo such as $('.ui.accordion').accordion('opne', 1), or a method that does not exist on the accordion module.
Common situations: Version skew where a method was renamed; wrong method name copied from memory.
Related errors
- The method you called is not defined
- The method you called is not defined.
- {name} cannot contain "{ruleValue}"
- The method you called is not defined.
- The method you called is not defined.
AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13).
Data as JSON: /api/errors/000eaf1cf514ccda.
Report an issue: GitHub.