Which jQuery version are you using?
I had the same issue, it only happens when you are logged In and trying to test in the same browser you are logged in, just give it a try in another browser, if it keeps doing the same behavior then, I suggest you to use the code I used to avoid conflict of jQuery version:
<!-- jQuery from CDN -->
var $ = jQuery.noConflict();
<!-- ALL jQuery plugins goes here -->
Use the code above on your master page or template you are invoking jQuery.