|
@@ -10,12 +10,17 @@ const {
|
|
|
const $ = require("jquery");
|
|
|
let TxtICon = require('./../images/txtIcon.png')
|
|
|
let VedioIcon = require('./../images/vedioIcon.png')
|
|
|
+let currentIcon = require('./../images/icon_current.png')
|
|
|
+
|
|
|
+
|
|
|
|
|
|
if(isIe8()) {
|
|
|
let reg = /undefined/g
|
|
|
TxtICon = TxtICon.replace(reg, '')
|
|
|
VedioIcon = VedioIcon.replace(reg, '')
|
|
|
+ currentIcon = currentIcon.replace(reg, '')
|
|
|
}
|
|
|
+
|
|
|
const isLocal = window.location.hostname.indexOf('localhost') !=-1;
|
|
|
function getInfomation() {
|
|
|
var param = {
|
|
@@ -100,6 +105,7 @@ function getInfomation() {
|
|
|
str = `<div class="infoWrapper">${str}</div>`
|
|
|
$(".infos").append(str);
|
|
|
$(".anchors ul").append(anchors);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -117,6 +123,7 @@ function getInfomation() {
|
|
|
if (divHeight > scrollTop) {
|
|
|
var anchor = 2 * (i);
|
|
|
$('.anchors ul').children().eq(anchor).addClass('active').siblings().removeClass('active');
|
|
|
+ setBackground()
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -128,12 +135,23 @@ getInfomation();
|
|
|
|
|
|
function addLinkClickEvent() {
|
|
|
$(".anchors ul li:first").addClass("active");
|
|
|
+ setBackground()
|
|
|
$(".anchors ul li>a").on("click", function () {
|
|
|
$(".active").removeClass('active');
|
|
|
$(this).parent().addClass("active");
|
|
|
+ setBackground()
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+function setBackground(){
|
|
|
+ $(".anchors i").css({
|
|
|
+ background:"#E0E2E3"
|
|
|
+ })
|
|
|
+ $(".anchors .active i").css({
|
|
|
+ background:`url(${currentIcon}) center center no-repeat`
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
function downLoadFile() {
|
|
|
$(".download").on("click", function(){
|
|
|
const downUrl = $(this).attr('data-url')
|