我正在尝试在我们的新ASPDotNetStoreFront站点上使用Superfish jQuery plugin,但我似乎无法让它工作。我们的网站是:http://saiedmusic.aspdotnetstorefront.active-e.net/default.aspx
我在Firebug中遇到这些错误:
SyntaxError: syntax error
<!DOCTYPE html>
superfish.js (line 6)
TypeError: jQuery(...).superfish is not a function
jQuery('ul.sf-menu').superfish();
saiedm...e-e.net (line 270)
这来自.ascx
模板文件。
我的问题是,这实际上是某种奇怪的方式,该网站没有拉入脚本?
我知道在某些情况下,空白<script src=" ">
会抛出该错误,但它似乎来自Javascript文件本身。
<%@ Control Language="c#" AutoEventWireup="false" Inherits="AspDotNetStorefront.TemplateBase" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>(!METATITLE!)</title>
(!CURRENCY_LOCALE_ROBOTS_TAG!)
<meta name="description" content="(!METADESCRIPTION!)" />
<meta name="keywords" content="(!METAKEYWORDS!)" />
<link rel="stylesheet" href="skins/Skin_(!SKINID!)/style.css" type="text/css" />
<script type="text/javascript" src="skins/skin_(!SKINID!)/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="skins/skin_(!SKINID!)/js/jquery-ui-1.10.4.custom.min.js"></script>
<!-- Top Drop -->
<link rel="stylesheet" href="skins/Skin_(!SKINID!)/superfish.css" type="text/css" />
<script type="text/javascript" src="skins/Skin_3/js/superfish.js"></script>
<script type="text/javascript" src="skins/Skin_(!SKINID!)/js/hoverIntent.js"></script>
<!-- End Top Drop -->
<link href="skins/Skin_(!SKINID!)/bjqs.css" rel="stylesheet" />
<link href="skins/Skin_(!SKINID!)/demo.css" rel="stylesheet" />
<script type="text/javascript" src="skins/Skin_(!SKINID!)/js/bjqs-1.3.min.js"></script>
<script type="text/javascript" src="skins/Skin_(!SKINID!)/js/jquery.secret-source.min.js"></script>
<!--Product Reviews Block:Reference-->
<link rel="stylesheet" href="skins/Skin_(!SKINID!)/colorbox.css" type="text/css">
<link rel="stylesheet" href="skins/Skin_(!SKINID!)/ratingpopup.css" type="text/css">
<link rel="stylesheet" href="skins/Skin_(!SKINID!)/ratingstyle.css" type="text/css">
<link rel="stylesheet" href="skins/Skin_(!SKINID!)/imageViewer.css" type="text/css" />
<script type="text/javascript" src="skins/skin_(!SKINID!)/js/jquery.colorbox.js"></script>
<!--End Product Reviews Block: Reference-->
<!-- Mini Cart -->
<link href="skins/skin_1/minicart-style.css" rel="stylesheet" type="text/css" media="all"/>
<script type="text/javascript" language="javascript" src="skins/Skin_(!SKINID!)/js/newminicart.js"></script>
<script type="text/javascript" language="javascript" src="skins/Skin_(!SKINID!)/js/vortxajax.js"></script>
<!-- End Mini Cart -->
<!--Product Page GZoom -->
<link rel="stylesheet" href="skins/Skin_(!SKINID!)/gzoom.css" type="text/css" />
<!--end Product Page GZoom -->
<!-- <script type="text/jscript">
$(function () {
$('.jquibutton').hover(
function () { $(this).addClass('ui-state-hover'); },
function () { $(this).removeClass('ui-state-hover'); }
);
});
</script>-->
<style type="text/css">
#containerfooter {
text-align: center;
background-color:white;
margin:0 auto 0 auto;
width: 960px;
color:black;
padding-bottom:10px;
font-family: "proxima-nova",sans-serif;
padding: 0px 0 0px 0;
}
#containerfooter > div {
border-right:dotted black 1px;
display: inline-block;
vertical-align: top;
/* IE fix. */
*display: inline;
zoom: 1;
padding:0px 15px 10px 15px;
box-sizing:border-box;
text-align:left;
}
#containerfooter:after {
content: "";
width: 100%;
display: inline-block;
}
</style>
</head>
<body>
(!XmlPackage Name="skin.adminalert.xml.config"!)
(!PAGEINFO!)
<div id="pageWrap">
<div id="headerWrap" class="box">
<div class="wrapper">
<div id="header">
<div id="topwrap">
<div id="accountLinks">
<span id="loginText"><a href="(!SIGNINOUT_LINK!)">(!SIGNINOUT_TEXT!)</a></span> <a href="shoppingcart.aspx">View Cart</a> <a href="account.aspx">View Account</a>
</div>
<a id="logo" href="default.aspx" title="Saiedmusic.com">
(!Topic name="template.logo"!)
</a>
<div id="searchWrap">
<form name="topsearchform" method="get" action="search.aspx">
<input type="text" size="10" name="SearchTerm" id="searchBox" value="Enter Keywords" onclick="javascript: this.value = ''"/>
<input type="button" onclick="document.topsearchform.submit()" id="searchGo" value="Search" />
</form>
</div>
</div>
<%--uncomment for multi language
<div id="ml">
<div style="visibility: (!COUNTRYDIVVISIBILITY!); display: (!COUNTRYDIVDISPLAY!);">
Language: (!COUNTRYSELECTLIST!)</div>
<div style="visibility: (!CURRENCYDIVVISIBILITY!); display: (!CURRENCYDIVDISPLAY!);">
Currency: (!CURRENCYSELECTLIST!)</div>
<div style="visibility: (!VATDIVVISIBILITY!); display: (!VATDIVDISPLAY!);">
VAT Mode: (!VATSELECTLIST!)</div>
</div>--%>
<div>
(!XmlPackage Name="topNav.xml.config"!)
<div style="clear: both;"></div>
</div>
<div style="clear: both;"></div>
</div>
</div>
</div>
<div id="contentcontainer">
<div id="pageWrap">
<div class="wrapper">
<div id="bodyWrap">
<div id="homecontainer">
<!-- CONTENTS START -->
<asp:PlaceHolder ID="PageContent" runat="server"></asp:PlaceHolder>
<!-- CONTENTS END -->
<div style="clear:both;"></div>
</div>
</div>
</div>
</div>
<div style="clear: both;"></div>
</div>
<div id="containerfooter" class="box clear">
(!topic name="template.footer"!)
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('ul.sf-menu').superfish();
});
</script>
</body>
</html>
答案 0 :(得分:0)
superfish.js
的请求会返回HTML内容而不是JavaScript。