add External javascript file - Syntax issue -



add External javascript file - Syntax issue -

when utilize next syntax, inline script not executed. in firebug not able debug code.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js" type="text/javascript" /> <script> $(document).ready(function () { $('#btn').bind('click', function () { alert('hai'); }); }); </script>

but if alter external file add together script, works fine. no issues @ all.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js" type="text/javascript" > </script>

you must close <script> tag.

w3.org:

start tag: required, end tag: required

javascript

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -