TypeError Jquery(...).function is not a function
<p>I'm having an issue with calling a method that has got me completely stumped. I have a set of methods in an external js class that's used for libraries outside core js for the WP theme. </p>

<p>(Sorry About the unending line)</p>

<p><strong>external.js</strong></p>

<pre><code>(function(a){
    var b=0;a.fn.mobileMenu=function(c){function e(a){return a.is("ul, ol")}function f(){return a(window).width()&lt;d.switchWidth}function g(c){if(c.attr("id")){return a("#mobileMenu_"+c.attr("id")).length&gt;0}else{b++;c.attr("id","mm"+b);return a("#mobileMenu_mm"+b).length&gt;0}}function h(a){if(a.val()!==null){document.location.href=a.val()}}function j(b){b.css("display","none");a("#mobileMenu_"+b.attr("id")).show()}function k(b){b.css("display","");a("#mobileMenu_"+b.attr("id")).hide()}function l(b){if(e(b)){var c='&lt;div class="td_mobile_menu_wrap"&gt;&lt;select id="mobileMenu_'+b.attr("id")+'" class="mobileMenu"&gt;';c+='&lt;option value=""&gt;'+d.topOptionText+"&lt;/option&gt;";b.find("li").each(function(){var b="";var e=a(this).parents("ul, ol").length;for(i=1;i&lt;e;i++){b+=d.indentString}var f=a(this).find("a:first-child").attr("href");var g=b+a(this).clone().children("ul, ol").remove().end().text();c+='&lt;option value="'+f+'"&gt;'+g+"&lt;/option&gt;"});c+="&lt;/select&gt;&lt;/div&gt;";b.parent().append(c);a("#mobileMenu_"+b.attr("id")).change(function(){h(a(this))});j(b)}else{alert("mobileMenu will only work with UL or OL elements!")}}function m(a){if(f()&amp;&amp;!g(a)){l(a)}else if(f()&amp;&amp;g(a)){j(a)}else if(!f()&amp;&amp;g(a)){k(a)}}var d={switchWidth:td_switch_width_normal,topOptionText:"Menu",indentString:"-"};return this.each(function(){if(c){a.extend(d,c)}var b=a(this);a(window).resize(function(){m(b)});m(b)})}})(jQuery);
</code></pre>

<p>And then the core </p>

<p><strong>site.js</strong></p>

<pre><code>jQuery('#td-top-menu .sf-menu').mobileMenu();
</code></pre>

<p>and i end up with the error: </p>

<pre><code>Uncaught TypeError: jQuery(...).mobileMenu is not a function
</code></pre>

<p>Somewhere along the line, i've managed to break this code and yet i'm not truly sure. I've stripped my header down to just the necessary scripts and nothing causes the error. My current JQuery CDN is the standard downloaded one from google cdn. I was under the impressional that i would get this issue because it cannot resolve the method. But if both scripts are there (I've logged external.js method to see that the script isn't broken), i don't see why it's throwing this error.</p>

<p>The site is <a href="http://whatzbuzzing.com" rel="nofollow">http://whatzbuzzing.com</a> to see the error first hand. As a wordpress distribution, i was under the impression that something has gone wrong outside the two files shown because they haven't been edited at all.</p>