Skip to content

Instantly share code, notes, and snippets.

@ds729
ds729 / app.coffee
Created November 10, 2012 05:57 — forked from h5y1m141/app.coffee
Titanium mobile “early” Advent Calendar 2012で紹介したMoment.jsのサンプル
# 最近、CoffeeScript使って書いてるので、元のcoffeeも載せておきます
moment = require('lib/moment.min')
momentja = require('lib/momentja')
mainWindow = Ti.UI.createWindow
title:'Moment.js Sample'
barColor:'#59BB0C'
@ds729
ds729 / index.html
Created October 27, 2012 11:08
A CodePen by ds729. Sliding door effects using CSS - I've used border tricks to get the effect.
<div class="slidingdoors">
<div class="slidetop"></div>
<div class="slideright"></div>
<div class="slidebottom"></div>
<div class="slideleft"></div>
<h3>follow me
<a href="https://twitter.com/samarkandiy" target="_blank">@samarkandiy</a>
</h3>
</div>
@ds729
ds729 / index.html
Created October 27, 2012 11:07
A CodePen by ds729. Sliding door effects using CSS - I've used border tricks to get the effect.
<div class="slidingdoors">
<div class="slidetop"></div>
<div class="slideright"></div>
<div class="slidebottom"></div>
<div class="slideleft"></div>
<h3>follow me
<a href="https://twitter.com/samarkandiy" target="_blank">@samarkandiy</a>
</h3>
</div>
@ds729
ds729 / 1.css
Created June 9, 2012 14:26
画像置換1
/*
マウスオーバーで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 {
@ds729
ds729 / gist:2472448
Created April 23, 2012 17:17
text-shadowいろいろ
/*いい感じなtext-shadowのまとめ。随時更新*/
.CPodShadowTop {
  text-shadow: 0 -1px black;
}
@ds729
ds729 / gist:2407231
Created April 17, 2012 16:13
jQueryでRSS取得(クロスドメイン)
//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;
@ds729
ds729 / gist:2405702
Created April 17, 2012 12:34
jQueryでRSS取得(ローカル)
//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',
@ds729
ds729 / gist:2405167
Created April 17, 2012 10:33
アドレスバーを隠す(スマートフォン)
window.onload = function(){
setTimeout("scrollTo(0,1)", 100);
}
@ds729
ds729 / gist:2405112
Created April 17, 2012 10:25
CSS3メディアクエリサンプル
@media screen and (max-width: 480px){ /* 画面が480pxの場合 */
body{ background: #80D0FF }
}
@media screen and (max-width: 320px){ /* 画面が320pxの場合 */
body{ background: #FFDBF3 }
@ds729
ds729 / gist:2405071
Created April 17, 2012 10:08
jQuery Mobile base
<!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>