The value of the property '$' is null or undefined, not a Function object

 

This character () gets added to my javascript file. i am using visual studio 2010.

 

This happens to me with new javascript files.
AND IT IS SUPER ANNOYING.

 

 

The characters added are BOM characters,are not advised for utf-8. Visual studio by default saves javascript files with “Unicode(UTF-8 with signature)- Codepage 65001″ encoding, this encoding adds the UTF-8 byte order mark at the beginning of the file. ie9 and chrome do not have a problem with it but firefox, opera and safari completely break....

 

It’s breaking in my IE9 for various reasons, perhaps mainly because the js is being included via a weird, legacy templating system out of my control.

 

so.

 

SOLUTION:

By default, Visual Studio uses UTF encoding with the BOM; however, you can save it to a different encoding if you’d prefer.  When you go to the Save As dialog, you can expand the Save button to see the ‘Save with Encoding’ option.  This will prompt you for a different encoding, and I think one of the Unicode options will leave out the BOM (somewhere in the list is UTF-8 without signature).

 

 

 

javascript.encoding.00 javascript.encoding.01 javascript.encoding.02 javascript.encoding.03