My code now ( in same .html file ):
<div id="name">my_name</div>
<script>
alert($("#name").text());
</script>
this works...
but I want to store this script in a different .js file like...
<script type="text/javascript" src="path/to/name.js"></script>
<div id="name">my_name</div>
expectation to alert 'my_name'