javascript - my test1.js is not working in html -


test.html

<!doctype html> <html>    <head>       <script  src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>                        <script type="text/javascript" href="test1.js"></script>       <link type="text/css" rel="stylesheet" href="test2.css">    </head>    <body>       <div></div>    </body> </html> 

css test2.css

div {     background - color: #000000;     height:400px; } 

test1.js

$(document).ready(function() {     $('div').fadeout('slow'); }); 

when page loads div not fading out. js file not being recognized browser

<script type="text/javascript" href="test1.js"></script> 

change to.. beacause href used <a> tag .

and if u want load external script need use src='value/location'

<script type="text/javascript" src="test1.js"></script> 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -