Original source (on modern site) | Article images: [1]
(성남=뉴스1) 김성진 기자 |
2024-04-19 06:00 송고 | 2024-04-19 06:33 최종수정
18일 오후 경기도 성남시 분당구 서울톨게이트에서 경찰 관계자들이 고속도로 음주운전 및 체납 차량 단속을 실시하고 있다. 2024.4.18/뉴스1
ssaji@news1.kr Copyright ⓒ 뉴스1. All rights reserved. 무단 전재 및 재배포, AI학습 이용 금지. '
+ ''
+ ''
+ '');
$li.find(" > a > .newtitle").text(title);
$li.find(" > a > .hitnews3").text(content);
} else {
$li = $(' '
+ ''
+ ' ');
$li.find(" > a > .newtitle").text(title);
$li.find(" > a > .hitnews2").text(content);
}
} else {
$li = $(' ');
$li.find(" > a").last().text(title);
}
$li.find("a").last().attr("href", url).attr("title", title);
$detail.append($li);
// } //
}) // for(var j in val[i])
} // for (var i in json.data)
/*$tab.append(' ');
$tab.append(' ');*/
_most_news_page = 0;
$list.find(".arrow.prev").click(function(e) {
e.preventDefault();
if (_most_news_page <= 0) {
var max = parseInt(Math.min(limit, json.size) / 5); // ( 0~2 )
_most_news_page = max;
$tab.animate({left: "-" + 265*(max) + "px"}, 'slow');
} else {
_most_news_page--;
$tab.animate({left: "+=265px"}, 'slow');
}
});
$list.find(".arrow.next").click(function(e) {
e.preventDefault();
var max = parseInt(Math.min(limit, json.size) / 5); // ( 0~2 )
if (_most_news_page >= max) {
_most_news_page = 0;
$tab.animate({left: "0px"}, 'slow');
} else {
_most_news_page++;
$tab.animate({left: "-=265px"}, 'slow');
}
});
$tab.find("> li > a").click(function(e) {
e.preventDefault();
var $li = $(this).parent();
$li.siblings().removeClass("on");
$li.addClass("on");
var cid = $(this).data("id"),
hasImg = $(this).data("img");
// setMostHitTab(cid, hasImg);
setMostHitTab_New(cid);
});
} // json.size >= 1
}).error(function (request) { // .success()
$list = $('#MostHitNews');
$list.hide();
});
}); // $(document).ready
function setMostHitTab_New(id) {
if(typeof id == 'undefined' || id == null) {
return ;
}
$list = $("#MostHitNews .rankNews");
$list.find('li').addClass('none');
$list.find('.tab'+id).removeClass('none');
$list = $("#MostHitNews .tabDetail");
if (id == 'total') {
$list.addClass('tabd_total');
} else {
$list.removeClass('tabd_total');
}
}
function setMostHitTab(id, hasImg) {
var data = _most_hits[id],
$list = $("#MostHitNews .rankNews");
// for (var i in data.data) {
_.each(data.data,function (val,i) {
// var val = data.data[i],
var num = parseInt(i) + 1,
$li = $list.find(".no" + num),
title = val['title'].decode(),
url = "/articles/?" + val['article_id'];
if (i == 0) {
var $content = $li.find(" .hitnews").last(),
content = val['content'].decode().cut(80);
if (hasImg == "on") {
$content.addClass("hitnews2").removeClass("hitnews3");
$li.find(".thumb > img").attr("src", val['img_url']);
$li.find(".thumb").show("fast");
} else {
$content.addClass("hitnews3").removeClass("hitnews2");
$li.find(".thumb").hide();
}
$li.find(" > a > .newtitle").text(title);
$content.text(content);
} else {
$li.find("> a").text(title);
}
$li.find("a").attr("href", url).attr("title", title);
})
}
홈 > 포토 > 사회 > 사건ㆍ사고