Thursday, January 13, 2011

Common pitfalls in Javascript

When you defined script tag in JS

Define it as follows
<script type="text/javascript" src="jquery.js"></script>

And not as
<script type="text/javascript" src="jquery.js"/>


In the second case, it'll not interpret the script tag appropriately and the function defined inside <script>

No comments:

Post a Comment