jQuery click event handler not firing -


i had more robust page, jquery not firing , have no idea why! in both firefox , chrome, there's nothing showing in console. please me see fried brain cannot see:

<html>  <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>     <script language="text/javascript">         $(document).ready(function() {             console.log("ready!");              $("#launch_windows").click(function(){                 console.log('launching');             });         });     </script> </head> <body>     <input type="button" id="launch_windows" value="launch" /> </body> </html> 

the language attribute deprecated based on mdn doc.

language 
type attribute, attribute identifies scripting language in use. unlike type attribute, however, attribute’s possible values never standardized. type attribute should used instead.

if want use language need use javascript (without text/) indicated in msdn documentation

use type attribute instead.

this attribute identifies scripting language of code embedded within script element or referenced via element’s src attribute. specified mime type; examples of supported mime types include text/javascript, text/ecmascript, application/javascript, , application/ecmascript. if attribute absent, script treated javascript.

if change mark

<script type="text/javascript">  

your code either works or shows errors in development console. can learned documentation leave type out. in case browser assumes content in script tag javascript


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -