Jquery + me2day 검색 > 개발자팁

개발자팁

개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.

Jquery + me2day 검색 정보

jQuery Jquery + me2day 검색

본문

데모페이지 : http://dokjin.toyntv.com/me2day.php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="history" content="">
<meta name="author" content="*** 개인정보보호를 위한 이메일주소 노출방지 ***">
<link rel="stylesheet" type="text/css" href="/inc/css/global.css" media="screen" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<title>미투데이 검색</title>
<style type="text/css">
 .module-twitterList {padding:10px; overflow:hidden; *zoom:1; background:#fff; overflow-y:auto;}
 .module-twitterList li {position:relative; width:100%; float:left; margin-bottom:10px; padding-bottom:10px; min-height:50px;_height:50px; border-bottom:1px dashed #dedede;}
 .module-twitterList li.last {border-bottom:none; padding-bottom:0; margin-bottom:0;}
 .module-twitterList .thum {position:absolute; top:0; left:0; width:50px; height:50px; overflow:hidden;}
 .module-twitterList .thum img {border:1px solid #ccc; width:48px; height:48px;}
 .module-twitterList p {padding:0 0 0 60px; color:#555; line-height:130%;}
 .module-twitterList p a {color:#888; line-height:130%;}
 .module-twitterList .userId {color:#555; font-weight:bold;}
 .module-twitterList .time {font-size:11px; color:#999;}
</style>
<script type="text/javascript">
<!--
function search_me2day(query){
 var html;
 var keyword= encodeURIComponent(query);
 $.getJSON("http://me2day.net/search.json?callback=?&query="+keyword+"&count=50",
 function(data) {
  $.each(data,
  function(i,item){ 
  html ='<li>';
  html +=' <div class="thum">';
  html +=' <a href="#"><img src="'+item.author.face+'" alt="" /></a>';
  html +='</div>';
  html +='<p>';
  html +=' <a href="'+item.author.me2dayHome+'" class="userId">'+item.author.nickname+'</a> '+item.body+' ';
  html +=' <a href="#">'+item.author.me2dayHome+'</a> ';
  html +=' <br /><span class="time">'+item.pubDate+'</span>';
  html +='</p>';
  html +='</li>';
  $("#resultme").append(html);
  }); 
 });
}
//-->
</script>
</head>
<body>
<div id="tabCon02" style="width:600px;padding:10px;border:#cccccc 1px solid;">
 <div class="module-twitterList" style="height:300px;"><ul id="resultme"></ul></div>
</div>
</body>
</html>
<script type="text/javascript">
<!--
 search_me2day('박정현');
//-->
</script><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 16:57:14 JavaScript에서 이동 됨]</div>
추천
0
  • 복사

댓글 0개

© SIRSOFT
현재 페이지 제일 처음으로