Aside from that, there's several things that could be causing it. Where's your script block in relation to the reference that's loading jQuery. If you're not going to encapsulate your jQuery in a
$(document).ready() type function, then it has to be called after jQuery has loaded. Otherwise, the error is absolutely correct, $ is undefined because I'm trying to run something but jQuery hasn't been loaded yet. It's typically best practices to have anything dependent on jQuery to be in a
$(document).ready() function as this ensures that jQuery has been loaded and initiated and the rendering of the page is complete before anything tries to run. It's possible you're seeing a Firefox inconsistency due to the fact that Firefox renders so much faster than IE and it may be getting ahead of itself. I've seen this with IE vs. Chrome many times.
The other possible issue (that was previously mentioned), is that jQuery may be loaded twice. If you try to load/reference the jQuery library and either it has already been loaded, or another version of it is loaded/referenced, it will blow up with the vague $ not defined. A simple solution to that is to crack open the dev tools and search for jquery to see how many times it is referenced.