This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ツイートの件数を取得する | |
$.getJSON("https://api.twitter.com/1/users/lookup.json?callback=?&screen_name=ds_style729&include_entities=true", | |
function(data) { | |
//console.log(data[0].statuses_count); | |
if(data!== undefined) { | |
$(".tweet").html("The present tweet number is " + data[0].statuses_count +"."); | |
} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//文字列から任意の文字の数をカウントする | |
function dataCount(keyStr,word ){ | |
var cnt=word.split(keyStr).length-1; | |
return count; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//画像の先読み | |
function loadImg(imgArr){ | |
for(var i=0;i<imgArr.length;i++){ | |
var imgObj=new Image(); | |
imgObj.src=imgArr[i]; | |
console.log(i); | |
}} | |
var arr=["paint01.png","paint02.png","paint03.png","paint04.png","paint05.png"]; | |
loadImg(arr); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>jQuery Mobile sample</title> | |
<link href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css" rel="stylesheet" type="text/css"/> | |
<script src="http://code.jquery.com/jquery-1.5.min.js" type="text/javascript"></script> | |
<script src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js" type="text/javascript"></script> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media screen and (max-width: 480px){ /* 画面が480pxの場合 */ | |
body{ background: #80D0FF } | |
} | |
@media screen and (max-width: 320px){ /* 画面が320pxの場合 */ | |
body{ background: #FFDBF3 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onload = function(){ | |
setTimeout("scrollTo(0,1)", 100); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://gihyo.jp/design/serial/01/jquery-site-production/0018 | |
jQuery(function($){ | |
// ul要素を入れておく | |
var rssBlock = $('#rss').append('<ul/>'); | |
// RSSの取得 | |
$.ajax({ | |
// 読み込むデータはXML | |
dataType: 'xml', | |
// 読み込みデータのURL | |
url: 'feed/rss2.xml', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://jsdo.it/ds.style729/pkv6 | |
//google+の場合は下記アドレスのRSSのあとにidを入れれば取れる | |
//http://gplus.slfeed.net/RSS2/112166094088653039891 | |
google.load("feeds", "1"); | |
var rssFeedUrl = "http://feedblog.ameba.jp/rss/ameblo/ske48official/rss20.xml"; | |
$.gFeed = function(url, options, callback){ | |
var opt = $.extend({q: url, v: '1.0', num: 10}, options); | |
if (!opt.q) return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*いい感じなtext-shadowのまとめ。随時更新*/ | |
.CPodShadowTop { | |
text-shadow: 0 -1px black; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
マウスオーバーでaの背景画像のopacityを1にする。CSS3のtransitionでもできる | |
li:hover{opacity:1;} | |
li{transition:0.5s;} | |
*/ | |
div#header ul#header_menu li.header_link03 { | |
background-image: url(../images/header_link03.png); | |
background-repeat: no-repeat; | |
} | |
div#header ul#header_menu li.header_link03 a { |
OlderNewer