Skip to content

Commit

Permalink
fix naver#360 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sculove committed Sep 21, 2015
1 parent fd479ae commit 5901a88
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tc/persist.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
</head>
<body>
<section id="newsLoader1">
<ul class="listContainer">
<ul id="newsLoader1_listContainer">
<li class="row">
<p><a href="http://me2.do/FF0C3V8H">'수요' 못 읽은 현대차… 판매량 줄며 매출·영업익 감소(종합)</a></p>
<p></p>
Expand All @@ -118,10 +118,10 @@
<p></p>
</li>
</ul>
<button>더보기1</button>
<button id="newsLoader1_more">더보기1</button>
</section>
<section id="newsLoader2">
<ul class="listContainer">
<ul id="newsLoader2_listContainer">
<li class="row">
<p><a href="http://me2.do/FF0C3V8H">중국 車업계 자체 기술로 전기차 개발…'고급·저가'로 승부</a></p>
<p></p>
Expand All @@ -135,7 +135,7 @@
<p></p>
</li>
</ul>
<button>더보기2</button>
<button id="newsLoader2_more">더보기2</button>
</section>
<script>
var newsData = [
Expand All @@ -156,9 +156,8 @@
function NewsLoader(baseElId) {
this.baseId = baseElId;
this.$baseEl = $("#" + this.baseId);
this.$ListContainer = $(".listContainer", this.$baseEl);
this.$LoadBtn= $("button", this.$baseEl);

this.$ListContainer = $("#" + this.baseId + "_listContainer");
this.$LoadBtn = $("#" + this.baseId + "_more");
// 더보기 버튼을 눌러 더 많은 코멘트 보여주기
this.$LoadBtn.on("click", $.proxy(this._appendNews,this));

Expand All @@ -183,6 +182,7 @@
}

NewsLoader.prototype._appendNews = function() {
console.log("append");
var newsHtml = "";
for(var i = 0 ; i < newsAddUnit ; i++){
var randomNews = newsData[Math.floor(Math.random()*10)];
Expand Down

0 comments on commit 5901a88

Please sign in to comment.