- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我在浏览器中预览时,Fancybox 在 Dreamweaver cs6 中完美运行。当我将网站上传到网络时,fancybox 无法正常工作。当我单击应该弹出精美框的图像时,它会在新窗口中打开。我花了几个小时试图看看我做错了什么,但没有运气。在这方面我是个菜鸟,边学边学。任何帮助将不胜感激。
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Carts</title>
<script type="text/javascript" src="http:code.jquery.com/jquery-latest.min.js"></script>
<link rel="stylesheet" href="js/fancyBox/source/jquery.fancybox.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/fancyBox/source/jquery.fancybox.pack.js"></script>
<style type="text/css">
.content {
background-color: #FF6;
height: 1000px;
width: 960px;
margin-right: auto;
margin-left: auto;
}
.header {
background-color: #C39;
height: 150px;
width: 960px;
}
.left {
background-color: #FFF;
height: 794px;
width: 200px;
float: left;
text-align: center;
}
.body1 {
float: left;
height: 346px;
width: 760px;
background-image: url(images/Content_background.png);
}
.video {
float: left;
height: 450px;
width: 760px;
text-align: center;
background-image: url(images/Content_background.png);
}
body {
background-image: url(images/bg.png);
margin-top: 0px;
}
</style>
<script type="text/javascript">
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>
</head>
<body onload="MM_preloadImages('images/images/images/Navover_01.png','images/images/images/Navover_02.png','images/images/images/Navover_03.png','images/images/images/Navover_04.png','images/images/images/Navover_05.png','images/images/images/Navover_06.png')">
<div class="content">
<div class="header"><a href="index.html"><img src="images/Juniorsgolfcartsheader-main.jpg" width="960" height="150" alt="Junior's Golf Carts" /></a>
<div class="Navbar"><a href="index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','images/images/images/Navover_01.png',1)"><img src="images/images/Navbar_01.png" width="160" height="50" id="Home" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Online Store','','images/images/images/Navover_02.png',1)"><img src="images/images/Navbar_02.png" width="160" height="50" id="Online Store" /></a><a href="Sales_Rentals.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Sales','','images/images/images/Navover_03.png',1)"><img src="images/images/Navbar_03.png" width="160" height="50" id="Sales" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Gallery','','images/images/images/Navover_04.png',1)"><img src="images/images/Navbar_04.png" width="160" height="50" id="Gallery" /></a><a href="About_us.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('About Us','','images/images/images/Navover_05.png',1)"><img src="images/images/Navbar_05.png" width="160" height="50" id="About Us" /></a><a href="Contact.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Contact','','images/images/images/Navover_06.png',1)"><img src="images/images/Navbar_06.png" width="160" height="50" id="Contact" /></a></div>
<div class="left"><img src="Homepage_pic/Shop_by_Category.png" width="162" height="40" alt="Shop" /><img src="Homepage_pic/Left_bar_catergory/images/Category_01.png" width="150" height="7" alt="line" /><img src="Homepage_pic/Left_bar_catergory/images/Category_03.png" width="135" height="39" alt="Shopping Cart" /><img src="Homepage_pic/Left_bar_catergory/images/Category_20.png" width="135" height="1" /><img src="Homepage_pic/Left_bar_catergory/images/Category_05.png" width="135" height="49" /><img src="Homepage_pic/Left_bar_catergory/images/Category_06.png" width="135" height="55" /><img src="Homepage_pic/Left_bar_catergory/images/Category_07.png" width="135" height="43" /><img src="Homepage_pic/Left_bar_catergory/images/Category_08.png" width="135" height="51" /><img src="Homepage_pic/Left_bar_catergory/images/Category_09.png" width="135" height="54" /><img src="Homepage_pic/Left_bar_catergory/images/Category_10.png" width="135" height="44" /><img src="Homepage_pic/Left_bar_catergory/images/Category_11.png" width="135" height="49" /><img src="Homepage_pic/Left_bar_catergory/images/Category_20.png" width="135" height="1" /><img src="Homepage_pic/Left_bar_catergory/images/Category_13.png" width="135" height="48" /><img src="Homepage_pic/Left_bar_catergory/images/Category_20.png" width="135" height="1" /><img src="Homepage_pic/Left_bar_catergory/images/Category_16.png" width="135" height="58" /><img src="Homepage_pic/Left_bar_catergory/images/Category_20.png" width="135" height="1" /><img src="Homepage_pic/Left_bar_catergory/images/Category_18.png" width="135" height="42" /><img src="Homepage_pic/Left_bar_catergory/images/Category_19.png" width="135" height="46" /><img src="Homepage_pic/Left_bar_catergory/images/Category_20.png" width="135" height="1" /><img src="Homepage_pic/Left_bar_catergory/images/Category_21.png" width="135" height="56" /><img src="Homepage_pic/Left_bar_catergory/images/Category_22.png" width="135" height="60" /></div>
<div class="video">
<p>PERSONAL GOLF CARTS</p>
<p>
<object width="420" height="315" align="top">
<param name="movie" value="http://www.youtube.com/v/18kl9k3aHjQ?hl=en_US&version=3&rel=0&autoplay=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/18kl9k3aHjQ?hl=en_US&version=3&rel=0&autoplay=1" width="420" type="application/x-shockwave-flash" height="315" allowscriptaccess="always" allowfullscreen="true" movie="http://www.youtube.com/v/18kl9k3aHjQ?hl=en_US&version=3&rel=0&autoplay=1" align="top"></embed>
</object>
</p>
</div>
<div class="body1">
<p> </p>
<p><a class="fancybox" href="Sales/Freedom_txtpopup.png"><img src="Sales/Freedom_TXT.png" width="250" height="205" alt="2Pass" /></a>
<script type="text/javascript">
$(document).ready(function() {
$(".fancybox").fancybox();
});
</script>
<a class="fancybox" href="Sales/Freedom_rxvpopup.png"><img src="Sales/freedomrxv.png" width="250" height="205" alt="RXV" /></a><a class="fancybox" href="Sales/Shuttle2_2popup.png"><img src="Sales/Shuttle2_2.png" width="225" height="211" alt="Shuttle 2+2" /></a></p>
</div>
</div>
</body>
</html>
最佳答案
在第四行你有:
<script type="text/javascript" src="http:code.jquery.com/jquery-latest.min.js"></script>
应该是:
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
关于javascript - Fancybox 只能在 Dreamweaver cs6 中正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19959919/
有一条(相对)众所周知的 Perl 公理:“只有 Perl 可以解析 Perl”。我想知道 Perl 6 是否仍然如此? 扩大讨论...考虑到 PyPy 最近的更新,我想到了这个问题。 Perl 独特
这是设置。在上一个问题中,我发现我可以通过子组件中的状态传递对象属性,然后使用 componentDidUpdate 获取该对象属性。在这种情况下,状态和属性都称为到达。 这是基本代码... expo
我运行的是 10.5.2 社区版。我已经标记了 源/主要/资源 作为源目录。我可以右键单击并“编译”某些文件,据我所知,这意味着 IDE 将文件复制到与发送类文件的“com.mydomain.pack
我是一名优秀的程序员,十分优秀!