login是控制弹出登录框的,本来好好的。
然后又链接了4个外部JS文件,是控制flash弹出层的;然后就发现login不肯出来了,firefox的错误显示
$(".signinclick") is null
[在此错误处中断]
$('.signinclick').hide();
看不懂啊,然后4个文件逐一删减,发现链上prototype.js的时候才会错误,所以才想是这两个js文件冲突了。求大神帮忙改改啊!!
login$(document).ready(function(){
$('.signinclick').hide(); $('.signin').click(function(){
if ($(".drop").is(':hidden')) {
$(".drop").slideDown().animate({height:'250px'},{queue:false, duration:600, easing: 'easeOutBounce'}),
$('#link').removeClass('signin').addClass('signinclick');
}
else {
$('.drop').slideUp(),
$('#link').removeClass('signinclick').addClass('signin');
}
return false;
});
$('.drop').click(function(e) {
e.stopPropagation();
});
$(document).click(function() {
$('.drop').fadeOut('fast'),
$('#link').removeClass('signinclick').addClass('signin');
});});
然后又链接了4个外部JS文件,是控制flash弹出层的;然后就发现login不肯出来了,firefox的错误显示
$(".signinclick") is null
[在此错误处中断]
$('.signinclick').hide();
看不懂啊,然后4个文件逐一删减,发现链上prototype.js的时候才会错误,所以才想是这两个js文件冲突了。求大神帮忙改改啊!!
login$(document).ready(function(){
$('.signinclick').hide(); $('.signin').click(function(){
if ($(".drop").is(':hidden')) {
$(".drop").slideDown().animate({height:'250px'},{queue:false, duration:600, easing: 'easeOutBounce'}),
$('#link').removeClass('signin').addClass('signinclick');
}
else {
$('.drop').slideUp(),
$('#link').removeClass('signinclick').addClass('signin');
}
return false;
});
$('.drop').click(function(e) {
e.stopPropagation();
});
$(document).click(function() {
$('.drop').fadeOut('fast'),
$('#link').removeClass('signinclick').addClass('signin');
});});
解决方案 »
- 在线等待,求正则表达式怎么写
- js中如何获取另外一个js传来的URL地址 急急急!!
- 刷新的问题
- myFocus为何在ie6下有些滤镜显示是黑色的长方形条形
- 广告[班组不要删,因为确实对本版的所有人有用]
- help!请问怎么才能不许输入框输入全角???
- 请教高手:onunload事件中能否返回false,达到不离开当前页面的目的吗?如果不能,用什么方法可以实现?在线苦等!
- 请问,,,JAVA Script 是什么,,,是不是HTML直接可以支持的东东呀
- JSscript有什么方法控制网页关闭时不出提示(解决马上结贴)?
- 帮忙写段代码!
- 关于javascript代码书写的问题,高手麻烦告知一下
- 想写一个评论的文本框,就好像这个文章标题后面那个提示信息
var Prototype = {
Version: '1.5.1.1', Browser: {
IE: !!(window.attachEvent && !window.opera),
Opera: !!window.opera,
WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1
}, BrowserFeatures: {
XPath: !!document.evaluate,
ElementExtensions: !!window.HTMLElement,
SpecificElementExtensions:
(document.createElement('div').__proto__ !==
document.createElement('form').__proto__)
}, ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/, emptyFunction: function() { },
K: function(x) { return x }
}var Class = {
create: function() {
return function() {
this.initialize.apply(this, arguments);
}
}
}var Abstract = new Object();Object.extend = function(destination, source) {
for (var property in source) {
destination[property] = source[property];
}
return destination;
}Object.extend(Object, {
inspect: function(object) {
try {
if (object === undefined) return 'undefined';
if (object === null) return 'null';
return object.inspect ? object.inspect() : object.toString();
} catch (e) {
if (e instanceof RangeError) return '...';
throw e;
}
}, toJSON: function(object) {
var type = typeof object;
switch(type) {
case 'undefined':
case 'function':
case 'unknown': return;
case 'boolean': return object.toString();
}
if (object === null) return 'null';
if (object.toJSON) return object.toJSON();
if (object.ownerDocument === document) return;
var results = [];
for (var property in object) {
var value = Object.toJSON(object[property]);
if (value !== undefined)
results.push(property.toJSON() + ': ' + value);
}
return '{' + results.join(', ') + '}';
}, keys: function(object) {
var keys = [];
for (var property in object)
keys.push(property);
return keys;
}, values: function(object) {
var values = [];
for (var property in object)
values.push(object[property]);
return values;
}, clone: function(object) {
return Object.extend({}, object);
}
});Function.prototype.bind = function() {
var __method = this, args = $A(arguments), object = args.shift();
return function() {
return __method.apply(object, args.concat($A(arguments)));
}
}
Function.prototype.bindAsEventListener = function(object) {
var __method = this, args = $A(arguments), object = args.shift();
return function(event) {
return __method.apply(object, [event || window.event].concat(args));
}
}Object.extend(Number.prototype, {
toColorPart: function() {
return this.toPaddedString(2, 16);
}, succ: function() {
return this + 1;
}, times: function(iterator) {
$R(0, this, true).each(iterator);
return this;
}, toPaddedString: function(length, radix) {
var string = this.toString(radix || 10);
return '0'.times(length - string.length) + string;
}, toJSON: function() {
return isFinite(this) ? this.toString() : 'null';
}
});Date.prototype.toJSON = function() {
return '"' + this.getFullYear() + '-' +
(this.getMonth() + 1).toPaddedString(2) + '-' +
this.getDate().toPaddedString(2) + 'T' +
this.getHours().toPaddedString(2) + ':' +
this.getMinutes().toPaddedString(2) + ':' +
this.getSeconds().toPaddedString(2) + '"';
};var Try = {
these: function() {
var returnValue; for (var i = 0, length = arguments.length; i < length; i++) {
var lambda = arguments[i];
try {
returnValue = lambda();
break;
} catch (e) {}
} return returnValue;
}
}/*--------------------------------------------------------------------------*/var PeriodicalExecuter = Class.create();
PeriodicalExecuter.prototype = {
initialize: function(callback, frequency) {
this.callback = callback;
this.frequency = frequency;
this.currentlyExecuting = false; this.registerCallback();
}, registerCallback: function() {
this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
}, stop: function() {
if (!this.timer) return;
clearInterval(this.timer);
this.timer = null;
}, onTimerEvent: function() {
if (!this.currentlyExecuting) {
try {
this.currentlyExecuting = true;
this.callback(this);
} finally {
this.currentlyExecuting = false;
}
}
}
}
Object.extend(String, {
interpret: function(value) {
return value == null ? '' : String(value);
},
specialChar: {
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'\\': '\\\\'
}
});Object.extend(String.prototype, {
gsub: function(pattern, replacement) {
var result = '', source = this, match;
replacement = arguments.callee.prepareReplacement(replacement); while (source.length > 0) {
if (match = source.match(pattern)) {
result += source.slice(0, match.index);
result += String.interpret(replacement(match));
source = source.slice(match.index + match[0].length);
} else {
result += source, source = '';
}
}
return result;
}, sub: function(pattern, replacement, count) {
replacement = this.gsub.prepareReplacement(replacement);
count = count === undefined ? 1 : count; return this.gsub(pattern, function(match) {
if (--count < 0) return match[0];
return replacement(match);
});
}, scan: function(pattern, iterator) {
this.gsub(pattern, iterator);
return this;
}, truncate: function(length, truncation) {
length = length || 30;
truncation = truncation === undefined ? '...' : truncation;
return this.length > length ?
this.slice(0, length - truncation.length) + truncation : this;
}, strip: function() {
return this.replace(/^\s+/, '').replace(/\s+$/, '');
}, stripTags: function() {
return this.replace(/<\/?[^>]+>/gi, '');
}, stripScripts: function() {
return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
}, extractScripts: function() {
var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
return (this.match(matchAll) || []).map(function(scriptTag) {
return (scriptTag.match(matchOne) || ['', ''])[1];
});
}, evalScripts: function() {
return this.extractScripts().map(function(script) { return eval(script) });
}, escapeHTML: function() {
var self = arguments.callee;
self.text.data = this;
return self.div.innerHTML;
}, unescapeHTML: function() {
var div = document.createElement('div');
div.innerHTML = this.stripTags();
return div.childNodes[0] ? (div.childNodes.length > 1 ?
$A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
div.childNodes[0].nodeValue) : '';
}, toQueryParams: function(separator) {
var match = this.strip().match(/([^?#]*)(#.*)?$/);
if (!match) return {}; return match[1].split(separator || '&').inject({}, function(hash, pair) {
if ((pair = pair.split('='))[0]) {
var key = decodeURIComponent(pair.shift());
var value = pair.length > 1 ? pair.join('=') : pair[0];
if (value != undefined) value = decodeURIComponent(value); if (key in hash) {
if (hash[key].constructor != Array) hash[key] = [hash[key]];
hash[key].push(value);
}
else hash[key] = value;
}
return hash;
});
}, toArray: function() {
return this.split('');
}, succ: function() {
return this.slice(0, this.length - 1) +
String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
}, times: function(count) {
var result = '';
for (var i = 0; i < count; i++) result += this;
return result;
}, camelize: function() {
var parts = this.split('-'), len = parts.length;
if (len == 1) return parts[0]; var camelized = this.charAt(0) == '-'
? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
: parts[0]; for (var i = 1; i < len; i++)
camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); return camelized;
},
jQuery.noConflict();
jQuery(document).ready(function(){
var $ = jQuery;
$('.signinclick').hide(); $('.signin').click(function(){
if ($(".drop").is(':hidden')) {
$(".drop").slideDown().animate({height:'250px'},{queue:false, duration:600, easing: 'easeOutBounce'}),
$('#link').removeClass('signin').addClass('signinclick');
}
else {
$('.drop').slideUp(),
$('#link').removeClass('signinclick').addClass('signin');
}
return false;
});
$('.drop').click(function(e) {
e.stopPropagation();
});
$(document).click(function() {
$('.drop').fadeOut('fast'),
$('#link').removeClass('signinclick').addClass('signin');
});});