我正在使用LightBox2获取简单的图片库。我设法使它工作,但现在它与我从我的页面引用的另一个JavaScript脚本文件冲突。lightbox2与脚本冲突
我的脚本使用$(document).ready(function() {
我不知道这是否是相关或不但是我知道,在一个点浏览器的调试器抱怨它。
对此有何见解?
============================================== ============== 我包含了部分产生错误的代码。虽然这工作正常。
var currs = {};
jQuery.noConflict();
jQuery(document).ready(function() {
var marketTypeSel = document.getElementById("selMarketType");
var propertyTypeSel = document.getElementById("selPropertyType");
var propertyStatusSel = document.getElementById("selPropertyStatus");
var zoneSel = document.getElementById("selZone");
var locSel = document.getElementById("selLocalities");
var currSel = document.getElementById("selCurrency");
var priceFromSel = document.getElementById("selPriceFrom");
var priceToSel = document.getElementById("selPriceTo");
//var data = {};
marketTypeSel.length = 0;
propertyTypeSel.length = 0;
propertyStatusSel.length = 0;
zoneSel.length = 0;
locSel.length = 0;
currSel.length = 0;
jQuery.ajax({
type: "POST",
url: "/Search/LoadInitSearchParameters",
//data: data,
dataType: "json",
success: function (result) {
它在所有浏览器中是否存在冲突?手段通常在IE中发生问题。 – 2012-03-16 09:35:29
是的所有浏览器:/ – Jonny 2012-03-16 09:36:51
我同意@devtut。你试过jQuery.noConflict()吗? – 2012-03-16 09:39:43