tinyNav: undefined is not a function

I’ve been having a tough bug to fix for my site that is related to the following part of functions.min.js :

	jQuery('#main-nav .root').tinyNav({active:'current-menu-item'})

When I run it in chrome, the console gives : “Uncaught TypeError: undefined is not a function”. In firefox, we get the more specific “TypeError: jQuery(…).tinyNav is not a function”.

I seem to get this error only in pages where I have some javascript running too. I suppose it might be a conflit of some sort with the jQuery version? I use the following line of code in my scripts :

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

Could anyone help me figure out how to fix this bug please?

Since you don’t know how to use wp_enqueue_script and that WordPress doesn’t use jQuery 1.10.2 anymore I would strongly recommend to keep away from custom implementations.

Loading jQuery from Google library sounds good only in theory but in reality you won’t get any speed improvements because you are creating extra ping to outside servers.

The best option for performance is to use a proper VPS with Nginx, W3 Total Cache and Memcached. Even DigitalOcean is ok and the price for their service is lower than most shared web hostings.