Commit a4108654 by doszhang

dos

parent 52a3f4b3
......@@ -120,9 +120,10 @@ var EventUtil = {
showCount++;
alert("Show has been fired " + showCount + " times.");
});
})();
$(document).ready(function () {
$(document).ready(function () {
for (let i = 0; i < 21; i++) {
$('.read' + i).hide();
}
......@@ -266,9 +267,9 @@ var EventUtil = {
link: linkAddress.link20,
index: 20
}, jumpTolink);
});
});
function jumpTolink(event) {
function jumpTolink(event) {
const link = event.data.link;
if (event.data.index || event.data.index == 0) {
const index = event.data.index;
......@@ -280,10 +281,10 @@ var EventUtil = {
window.location.href = link;
}, 100);
}
}
function getTranslateDistance(cardinal = 0, abs = false) {
function getTranslateDistance(cardinal = 0, abs = false) {
var wrapInnerTransform = $('.wrap-inner').css('transform');
var wrapInnertop = parseFloat($('.wrap-inner').css('top'));
wrapInnerTransform = wrapInnerTransform.match(/^matrix\(1,\s0,\s0,\s1,\s0,\s\-?(\d+)/);
......@@ -295,29 +296,29 @@ var EventUtil = {
}
return wrapInnerjl + cardinal + 'px';
}
}
//获取随机数方法
//min 最小值
//max 最大值
function RandomNumBoth(Min, Max) {
//获取随机数方法
//min 最小值
//max 最大值
function RandomNumBoth(Min, Max) {
var Range = Max - Min;
var Rand = Math.random();
var num = Min + Math.round(Rand * Range); //四舍五入
return num;
}
}
//写cookies
//写cookies
function setCookie(name, value) {
function setCookie(name, value) {
var Days = 30;
var exp = new Date();
exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
}
}
//读取cookies
function getCookie(name) {
//读取cookies
function getCookie(name) {
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
if (arr = document.cookie.match(reg))
......@@ -325,4 +326,4 @@ var EventUtil = {
return unescape(arr[2]);
else
return null;
}
\ No newline at end of file
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment