我需要另一組眼睛。當我使用jsfiddle一切正常,但出於某種原因,我無法讓它在Dreamweaver中運行。我沒有得到任何錯誤或類似的東西。我稍後再試,因爲這可能是因爲我的Dreamweaver出現故障。查看代碼並告訴我你的想法。顯然這是一項正在進行的工作。代碼如下。似乎無法讓我的jQuery工作
HTML
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link type="text/css" rel="stylesheet" href="Portfolio.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="PortfolioControl.js" type="text/javascript"></script>
<title>Home Page</title>
</head>
<body>
<!-- CONTENT //-->
<table align="center" id="navTable">
<tr>
<!-- NAME AND LOGO //-->
<td colspan='2' id="titleBar">
</td>
</tr>
<tr>
<td>
<div class="navButton">
<p>Home</p>
</div>
</td>
<!-- RIGHT SIDE //-->
<td id="rightSide" rowspan='5'>
<p>replaced on ready</p>
</td>
</tr>
<tr>
<td>
<div class="navButton">
<p>Art</p>
</div>
</td>
</tr>
<tr>
<td>
<div class="navButton">
<p>Projects</p>
</div>
</td>
</tr>
<tr>
<td>
<div class="navButton">
<p>Blog</p>
</div>
</td>
</tr>
<tr>
<td>
<div class="navButton">
<p>Contact</p>
</div>
</td>
</tr>
</table>
</body>
</html>
CSS
body {
background: #000000;
}
/* TITLE */
#titleBar {
height: 100px;
}
/* DYNAMIC RIGHT SIDE*/
#rightSide {
width: 620px;
border-left: 2px solid white;
padding: 15px;
}
#rightSide p {
color: #FFFFFF;
}
/* MAIN PAGE TABLE */
#navTable {
margin-top:200px;
width: 800px;
padding: 20px;
background-color: #000000;
}
#navTable td {
padding-right: 15px;
}
/* NAV BUTTONS */
.navButton p {
font-size: 18px;
font-weight: bold;
font-family: Helvetica, Arial, sans-serif;
color: #FFFFFF;
}
.navButton p:hover {
color: #FF7600;
}
的Javascript
$(document).ready(function() {
//create a p
var yay = $('<p>Yay</p>');
$('rightSide').append(yay);
});
'$('#rightSide')。append(yay);' – mdesdev
ummmm。那不是沒有Java – scrblnrd3
它是jQuery;) – mdesdev