Uncaught TypeError: ((x.event.special[i.origType] || (intermediate value)).handle || i.handler).apply is not a function

In my case the error was caused by binding events to functions that didn’t exist. I had removed functions that I didn’t know was bound to events.

See snippet below:

var foo = {
  bar1: function(){
    alert('working');
  }
};

// Working
$('body').on('click', '.my-button', foo.bar1);

// Not Working because bar2 doesn't exist
$('body').on('click', '.my-button', foo.bar2);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<span class="my-button">Click me</span>

It will produce:

Uncaught TypeError: ((n.event.special[g.origType] || (intermediate
value)).handle || g.handler).apply is not a function

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)