このスレッドにはすでに多くの友人がここや他のサイトにいることを認識していますが、すべてのスレッドは「あなたには対立があります」で終わっているようです. 競合がある場合は、表示されていません。競合がある場合は、おそらくページにある Telerik とその RadGrid、RadToaster、RadYoyo などが原因です。しかし、私が何かを見逃しているだけかもしれません。<head> に含まれる jQuery を削除すると、「$ is not defined」というエラーが発生します。
<head> の内容は次のとおりです。jQuery のインクルージョンは含まれていますが、Telerik の <link> タグは含まれていません。どんな助けでも大歓迎です。私は困惑しています。
コントロール付き HTML:
<div id="search">
<form method="get">
<input name="ctl00$ctl00$ContentPlaceHolder1$ContentPlaceHolder1$q" type="text" id="ContentPlaceHolder1_ContentPlaceHolder1_q" size="35" placeholder="Search..." />
</form>
</div>
ヘッダ:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-40617410-1']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<link rel="stylesheet" href="../Content/smoothness/jquery-ui-1.10.0.custom.min.css" /><link href="../Content/Site.css" rel="stylesheet" type="text/css" /><link href="Parts.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="../Scripts/LiveHelp.js"></script>
<script type="text/javascript" src="/Scripts/gridHelpers.js"></script>
<script type="text/javascript">
// needs to be present for clearFilter()
var radGrid;
$(document).ready(function () {
$('#ContentPlaceHolder1_ContentPlaceHolder1_q').bind('keypress', function (e) {
var code = (e.keyCode ? e.keyCode : e.which);
if (code == 13)
DoSearch($('#ContentPlaceHolder1_ContentPlaceHolder1_q').val());
});
//$('#orderHistoryButton').bind('click', function () {
// DoOrderHistory();
//});
$('#ContentPlaceHolder1_ContentPlaceHolder1_favoritesButton').bind('click', function () {
DoFavorites();
});
//$('#mostPopularButton').bind('click', function () {
// DoMostPopular();
//});
$("#ContentPlaceHolder1_ContentPlaceHolder1_CategoryFilter").change(function () {
DoCategoryFilter($(this).val());
//DoCategoryFilter(cat_ddl.val());
});
$('#ContentPlaceHolder1_ContentPlaceHolder1_q').autocomplete({ source: ['Lid'] });
radGrid = $find("ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_RadGrid1");
});
function DoSearch(searchText) {
$("#ContentPlaceHolder1_ContentPlaceHolder1_CategoryFilter").val('');
$find("ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_m_AjaxManager").ajaxRequest("Search" + "|" + searchText);
}
//function DoOrderHistory() {
// $('#ContentPlaceHolder1_ContentPlaceHolder1_q').val('');
// $find("ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_m_AjaxManager").ajaxRequest("OrderHistory");
//}
function DoFavorites() {
$('#ContentPlaceHolder1_ContentPlaceHolder1_q').val('');
$find("ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_m_AjaxManager").ajaxRequest("Favorites");
}
//function DoMostPopular() {
// $('#ContentPlaceHolder1_ContentPlaceHolder1_q').val('');
// $find("ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_m_AjaxManager").ajaxRequest("MostPopular");
//}
function DoCategoryFilter(id) {
$('#ContentPlaceHolder1_ContentPlaceHolder1_q').val('');
$find("ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_m_AjaxManager").ajaxRequest("Filter|" + id);
}
function AddToCart(partId) {
var quantity = $('#qty_' + partId).val();
$find("ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_m_AjaxManager").ajaxRequest("AddToCart" + "|" + partId + "|" + quantity);
var currentQuantity = parseInt($find("ContentPlaceHolder1_ContentPlaceHolder1_m_CartItemCountLabel").innerHTML);
if (!isNaN(currentQuantity)) {
currentQuantity += quantity;
$find("ContentPlaceHolder1_ContentPlaceHolder1_m_CartItemCountLabel").innerHTML = currentQuantity;
}
}
function refreshGrid(arg) {
if (!arg) {
$find("ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_m_AjaxManager").ajaxRequest("Rebind");
}
else {
$find("ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_m_AjaxManager").ajaxRequest("RebindAndNavigate");
}
}
function ShowDetailView(id) {
window.radopen("DetailView.aspx?id=" + id, "DetailViewWindow");
return false;
}
function ImagePreview(id) {
}
</script>
<style>body { background: transparent url('/images/background4.jpg') no-repeat top center; }</style>
<script type="text/javascript">
$(document).ready(function () {
$("td.menu > li").css("color", "red");
$("li ul li").css("color", "blue")
$("li ul li").hide();
$("ul.menu li").hover(
function () {
$("ul li", this).show();
}, function () {
$("ul li", this).hide();
}
);
});
</script>
<style type="text/css" media="screen">
body {
background-size: 100% auto;
}
.mymenu
{
margin: 0;
padding: 0;
}
.mymenu li
{
width: 100px;
margin: 0;
padding: 0px;
list-style: none;
float: left;
}
.mymenu li a
{
display: block;
margin: 0 1px 0 0;
padding: 4px 0px;
width: 100px;
/*background: #bbbaaa;*/
color: #ffffff;
text-align: center;
}
.mymenu ul a:hover
{
background: #2f2f2f
}
.mymenu ul
{
position: absolute;
visibility: hidden;
margin: 0 1px 0 0;
padding: 0;
/*background: #eeebdd;*/
/*border: 1px solid #ffffff*/
}
.mymenu ul a
{
position: relative;
display: block;
margin: 0 1px 0 -30px;
padding: 5px 10px;
width: 140px;
text-align: left;
background: #000000;
color: #ffffff;
}
</style>
<script type="text/javascript">
//variables' declaration
var timer = 0;
var item = 0;
//function for opening of submenu elements
function openelement(num)
{
//checks whether there is an open submenu and makes it invisible
if(item) item.style.visibility = 'hidden';
//shows the chosen submenu element
item = document.getElementById(num);
item.style.visibility = 'visible';
}
// function for closing of submenu elements
function closeelement()
{
//closes the open submenu elements and loads the timer with 500ms
timer = window.setTimeout("if(item) item.style.visibility = 'hidden';",500);
}
//function for keeping the submenu loaded after the end of the 500 ms timer
function keepsubmenu()
{
window.clearTimeout(timer);
}
//hides the visualized menu after clicking outside of its area and expiring of the loaded timer
document.onclick = closeelement;
</script>