Often ( too often ) I get this error in chrome console. I really can’t find any syntacs error in my javascript code
When I try to locate where this error happen in google chrome, it always shows this:

It shows that error is on the beginning of the file ( somewhere around DOCTYPE ). Is this just that chrome doesn’t show more infos or I messed up with inclusion of the files somewhere? ( or maybe even syntacs? ).
Either way, I can’t locate it with help of debug console
this is global.js:
(function() {
$("#btadd").click(function() {
$(".newlist").slideUp();
return false;
});
})();
this is html:
<div class="newlist" style="display:none">
<h4>Title: <input type="text"/></h4>
</div>
<br />
<a href="javascript:void()" id="btadd"><span>Add New</span></a>
Change this:
to this:
Or move your existing JavaScript to the end of the body. You created a self-invoking anonymous function that’s executing before the elements it applies to have been loaded. This would work fine once the DOM is fully loaded, but since it’s in the head of your document it runs too early. By using the example I showed you you’re using jQuery’s document ready event to run the code.