Jquery Load
so learned jquery , how load html file. tried add jquery load syntax html file. worked in dreamweaver live preview. when load file in browser, jquery load file did not show up.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>untitled document</title>
<script src="http://code.jquery.com/jquery-1.9.1.min.js" type="text/javascript"></script>
</head>
<body>
<div class="nav">
<script>
$(document).ready(function(){
$(".nav").load("nav.html");
});
</script>
</div>
</body>
</html>
this 1 main html page.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>untitled document</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<div class="nav">
<ul>
<li><a href="#">home</a></li>
<li><a href="#">about</a></li>
<li><a href="#">contact</a></li>
<li><a href="#">other</a></li>
</ul>
</div>
</body>
</html>
and 1 one want load file main html page.
@charset "utf-8"; /* css document */ body { padding: 0; margin: 0; } .nav { font-family: 'raleway', arial; background-color: #000000; width: 100%; height: auto; } .nav ul li { list-style-type: none; display: inline-block; padding: 10px; } .nav ul li { text-decoration: none; color: #fff; padding: 10px; } .nav li a:hover { background-color: #da2124; }
this one's 1 use style file want load.
what browser console when try load page? console errors give indication of problem may be.
best,
shocker
More discussions in Dreamweaver support forum
adobe
Comments
Post a Comment