Semantic-Org/Semantic-UI · error

The method you called is not defined.

Error message

The method you called is not defined.

What it means

Generic Semantic UI method-not-found error thrown by the visibility behavior's invoke dispatcher (visibility.js:1164). Calling $('.selector').visibility('nonExistent') walks the module internals and, finding no matching function, logs this error.

Source

Thrown at src/definitions/behaviors/visibility.js:1305

  onFixed                : function() {},
  onUnfixed              : function() {},

  // utility callbacks
  onUpdate               : false, // disabled by default for performance
  onRefresh              : function(){},

  metadata : {
    src: 'src'
  },

  className: {
    fixed       : 'fixed',
    placeholder : 'placeholder',
    visible     : 'visible'
  },

  error : {
    method  : 'The method you called is not defined.',
    visible : 'Element is hidden, you must call refresh after element becomes visible'
  }

};

})( jQuery, window, document );

View on GitHub (pinned to 597843ab84)

Solutions

  1. Verify the method name against the Semantic UI Visibility docs for the installed version.
  2. Use the canonical methods: refresh, destroy, disable, enable, etc.
  3. Reinstall/rebuild Semantic UI if a known method is unexpectedly missing.

Example fix

// before
$('.ad').visibility('refesh');
// after
$('.ad').visibility('refresh');
Defensive patterns

Strategy: type-guard

Validate before calling

var VIS_METHODS = ['refresh','destroy','disable','enable'];
function safeVisCall($el, method) {
  if (VIS_METHODS.indexOf(method) === -1) { console.warn('Unknown visibility method:', method); return; }
  return $el.visibility(method);
}

Type guard

function isKnownVisibilityMethod(name) {
  return ['refresh','destroy','disable','enable'].indexOf(name) !== -1;
}

Prevention

When it happens

Trigger: Invoking a misspelled or unavailable visibility method, e.g. $('.el').visibility('refesh'), or calling a method from a newer version on an older build.

Common situations: Typos; copy-pasting code from docs of a different Semantic UI version; calling private methods without the correct prefix; misusing visibility methods that belong to sticky instead.

Related errors


AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13). Data as JSON: /api/errors/96b3c2db5376834f. Report an issue: GitHub.