What causes TypeError: undefined is not a function?
<p>All,
I've got some code that I'm trying to debug and I used the following bit of code in my JS console:</p>

<pre><code>clickEvents = $('ul.breadcrumb[data-allownextonly]').data("events").click;
jQuery.each(clickEvents, function(key, value) {
    console.log(value.handler);
})
</code></pre>

<p>When I execute this I get the error:
TypeError: undefined is not a function</p>

<p>My question is what causes this to happen? From most of the things I read it deals with the fact that jQuery isn't loaded properly or there is a conflict between two scripts. jQuery is loading properly because I have other objects on my page that jQuery is working fine on. I'm using Wordpress so there is already no conflict. </p>

<p>In my console I changed my JS debugging to something like this:</p>

<pre><code> clickEvents = jQuery('ul.breadcrumb[data-allownextonly]').data("events").click;
jQuery.each(clickEvents, function(key, value) {
    console.log(value.handler);
})
</code></pre>

<p>When I execute this I get the following error:
TypeError: Cannot read property 'click' of undefined</p>

<p>Can anyone let me know what other reasons I would be getting these errors? If I have a conflicting script or something along those lines, how can I find out where the conflict is?</p>

<p>Thanks!</p>
