Home > Web Front-end > JS Tutorial > Discuz! 6.1_jQuery compatibility issue_jquery

Discuz! 6.1_jQuery compatibility issue_jquery

WBOY
Release: 2016-05-16 19:00:48
Original
1182 people have browsed it
复制代码 代码如下:

--- common.jquery.js
common.original.js
@@ -8,28 8,28 @@
*/

var lang = new Array();
var userAgent = navigator.userAgent.toLowerCase();
var is_opera = userAgent.indexOf('opera') != -1 && opera.version();
var is_moz = (navigator.product == 'Gecko') && userAgent.substr(userAgent.indexOf('firefox') 8, 3);
var is_ie = (userAgent.indexOf('msie') != -1 && !is_opera) && userAgent.substr(userAgent.indexOf('msie') 5, 3);

function $(id) {
return document.getElementById(id);
}
-if(typeof Array.prototype.push === 'undefined') {

Array.prototype.push = function(value) {
this[this.length] = value;
return this.length;
}
-}

function checkall(form, prefix, checkall) {
var checkall = checkall ? checkall : 'chkall';
for(var i = 0; i < form.elements.length; i ) {
var e = form.elements[i];
if(e.name && e.name != checkall && (!prefix || (prefix && e.name.match(prefix)))) {
e.checked = form.elements[checkall].checked;
}
}
}

function doane(event) {

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template