lundi 21 avril 2014

jQuery - ne peut pas obtenir Superfish menu pour travailler sur le Site de ASPDotNetStoreFront - Stack Overflow


I am attempting to use the Superfish jQuery plugin on our new ASPDotNetStoreFront site, but I can't seem to get it to work. Our site is: http://saiedmusic.aspdotnetstorefront.active-e.net/default.aspx


I get these errors in 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)

This is coming from a .ascx template file.


My question is if this is actually some sort of weird way that the site is not pulling in the script?


I know in some cases a blank <script src=" "> can throw that error, but it appears to be coming from the Javascript file itself.


<%@ 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>



The request to superfish.js returns HTML content instead of the JavaScript.


enter image description here



I am attempting to use the Superfish jQuery plugin on our new ASPDotNetStoreFront site, but I can't seem to get it to work. Our site is: http://saiedmusic.aspdotnetstorefront.active-e.net/default.aspx


I get these errors in 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)

This is coming from a .ascx template file.


My question is if this is actually some sort of weird way that the site is not pulling in the script?


I know in some cases a blank <script src=" "> can throw that error, but it appears to be coming from the Javascript file itself.


<%@ 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>


The request to superfish.js returns HTML content instead of the JavaScript.


enter image description here


0 commentaires:

Enregistrer un commentaire