我试图让任何jquery脚本工作。就目前而言,当我放入jquery脚本时,绝对没有任何反应。我根本无法发生任何事情。脚本src是正确的。如果我把它直接放入体内也没有任何作用。任何帮助将不胜感激。
$(document).ready(function() {
$("#topwrap").slideDown("slow");
});
这就是我想要执行的所有内容,因为我只是试图让事情发生。
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-- <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>NotFM</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</head>
<body style="background-image: url(backer.jpg)">
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<!-- Add your site or application content here -->
<div id="topwrap">
<div id="logo"><img src="splashimagesml.png"></div>
<div id="radio"> <!-- This will be the radio widget --><p>RADIO WIDGET WILL GO HERE!</p></div>
<div id="logo2"><img src="splashimagesml2.png"></div>
</div>
<div id="menubar"> <!-- This will be the menubar -->
<div id="wrap">
<a class=".top" href ="index.php?p=home">Home</a>
<a href ="index.php?p=band">Bands</a>
<a href ="index.php?p=gig">Gigs</a>
<a href ="index.php?p=festival">Festivals</a>
<a href ="index.php?p=tattoo">Tattoo</a>
<a href ="http://www.notfm.co.uk/Forum/index.php?p=/">Forum</a>
<a href ="index.php?p=review">Reviews</a>
</div>
</div>
<div id="lnav"class="main"> <!-- This will be left navigation/display bar -->
<?php
$pages_dir = 'pages';
if (!empty($_GET['p']))
{
$pages = scandir($pages_dir, 0);
unset($pages[0], $pages[1]);
$p = $_GET['p'];
if (in_array($p.'.php', $pages))
{
include($pages_dir.'/'.$p.'.php');
}
else {
echo "PAGE NOT FOUND";
}
} else {
include($pages_dir.'/home.php');
}
?>
</div>
<div id="main" class="main" >
<?php
$pages_dir = 'pages';
if (!empty($_GET['p2']))
{
$pages = scandir($pages_dir, 0);
unset($pages[0], $pages[1]);
$p2 = $_GET['p2'];
if (in_array($p2.'.php', $pages))
{
include($pages_dir.'/'.$p2.'.php');
}
else {
echo "PAGE NOT FOUND";
}
} else {
include($pages_dir.'/soon.php');
}
?>
</div>
<div id="rnav" class="main"> <!-- This will be the right hand side menu/navigation/advertising area -->
<div id="top"> <h3> RIGHT NAV BAR- SHiznitz goes here innit</h3></div>
<div id="bottom"><h3>BOTTOM</div><h3></h3>
</div>
<div id="footer"> <!-- This will be the footer --><h3>FOOTER - NotFM Logo © Michael Gillman. Website design © Richard Ross</h3></div>
<!-- Google Analytics: change UA-XX-X to be your site's ID.
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-XX-X');ga('send','pageview');
</script> -->
</body>
</html>
答案 0 :(得分:2)
看起来就像你本地测试一样。
如果是这种情况
<script src="//ajax.googleapis.
应该是
<script src="https://ajax.googleapis.
修改强>
尝试将 topwrap div 设置为display:none