|
@@ -82,7 +82,7 @@ function renderContent(list, contentWrapClassName){
|
|
|
str += item.title
|
|
|
}
|
|
|
str += '</h2></div>' +
|
|
|
- '<div><pre>' + item.content + '</pre><div></div>';
|
|
|
+ '<div class=""><pre>' + item.content + '</pre><div></div>';
|
|
|
str = `<div class="infoWrapper">${str}</div>`
|
|
|
$(`.${contentWrapClassName} .infos`).append(str);
|
|
|
$(`.${contentWrapClassName} .anchors ul`).append(anchors);
|
|
@@ -103,6 +103,7 @@ function renderContent(list, contentWrapClassName){
|
|
|
$(".infos").scroll(throttle(addScrollEvent, 200));
|
|
|
addLinkClickEvent(contentWrapClassName);
|
|
|
adjustHeight();
|
|
|
+ adjustWidth()
|
|
|
}
|
|
|
|
|
|
|
|
@@ -151,7 +152,14 @@ function adjustHeight() {
|
|
|
var ht = window.innerHeight;
|
|
|
$(".content").height(ht - 145 - 30 + "px");
|
|
|
}
|
|
|
+// function adjustWidth() {
|
|
|
+// var wt = window.innerWidth;
|
|
|
+// var wt = window.innerWidth || document.documentElement.clientWidth;
|
|
|
+// $(".titleH2").width(wt- 0.2*wt -33 - 200 - 17 - 40 -15 + 'px')
|
|
|
+// $(".content").width(wt- 0.2*wt -33 - 200 - 17 - 40 -15 + 'px')
|
|
|
+// }
|
|
|
$(window).on('resize', function(){
|
|
|
adjustHeight()
|
|
|
+ adjustWidth()
|
|
|
})
|
|
|
|