Design & Development

jQuery 샘플 – 트윗 가져오기

걍 심심해서 jsFiddle 에 있는 예제에 몇 줄 추가해봤다.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="en" lang="en">

<script type="text/javascript" src=""></script>
<input type="text" id="input"></input>
<input type="text" id="twtno" value="20"></input>
<button id="gettweet">Get Tweet</button></p>

<ol id="tweets">
	$.fn.tweets = function(options) {
		$.ajaxSetup({ cache: true });
		var defaults = {
			tweets: 20,
			before: "<li>",
			after: "</li>"
		var options = $.extend(defaults, options);
		return this.each(function() {
			var obj = $(this);
		        function(data) {
		            $.each(data.results, function(i, tweet) {
		                if(tweet.text !== undefined) {

      tweets: $('#twtno').val(),
      username: $('#input').val()


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s