<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5039078013010092514</id><updated>2026-05-23T06:00:32.588+09:00</updated><category term="JavaScript"/><category term="php"/><category term="iPhone"/><category term="cakePHP"/><category term="Android"/><category term="Smart Phone"/><category term="css"/><category term="mootools"/><category term="WordPress"/><category term="HTML5"/><category term="jQuery"/><category term="DataBase"/><category term="MySQL"/><category term="Linux"/><category term="SVG"/><category term="Symfony"/><category term="compass"/><category term="jmeter"/><category term="Program"/><category term="Ruby"/><category term="Ruby on Rails"/><category term="Mail"/><category term="Movie"/><category term="Raphael"/><category term="iPad"/><category term="sass"/><category term="Ajax"/><category term="Animation"/><category term="Backbone.js"/><category term="Git"/><category term="Mobile"/><category term="Prototype"/><category term="Selenium"/><category term="Session"/><category term="Smarty"/><category term="UI"/><category term="Action Script"/><category term="Apache"/><category term="Application"/><category term="Color"/><category term="Cookie"/><category term="Flash"/><category term="Font"/><category term="Form"/><category term="Java"/><category term="Mac"/><category term="Marketing"/><category term="Safari"/><category term="Stock Photo"/><category term="Test"/><category term="TweenMax.js"/><category term="Typography"/><category term="Usability"/><category term="Zend"/><category term="browser"/><category term="copyright"/><category term="createjs"/><category term="html"/><category term="less"/><category term="twitter"/><category term="広告"/><title type='text'>make a record of…</title><subtitle type='html'>Web制作関連についてのメモ</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>229</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-5969057797418222746</id><published>2017-04-08T23:32:00.002+09:00</published><updated>2017-04-09T00:58:59.512+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="createjs"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><title type='text'>[createjs] ステージ上をドラッグしている途中のマウス位置を取得する</title><content type='html'>gihyo.jpのcreatejsの記事を実際にやってみてちょっとひっかかった&lt;br /&gt;
&lt;a href=&quot;http://gihyo.jp/design/serial/01/createjs/0009&quot;&gt;http://gihyo.jp/design/serial/01/createjs/0009&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
記事は2013年のもので、createjs側の書き方が変わっていたみたい&lt;br /&gt;
記事内ではTickerでstage.mouseXでマウス位置を取得していたが、easeljsのバージョン0.8.2ではマウスを移動しても、ドラッグしようとしてmousedownした際の位置の値が返ってくるだけで移動した後の位置は取得できなかった&lt;br /&gt;
&lt;br /&gt;
新しい書き方はstageに対して「stagemousemove」というイベントを使うようだ。&lt;br /&gt;
これでタッチデバイスも反応するのかは調べてみよう&lt;br /&gt;
&lt;br /&gt;
let stage = new createjs.Stage(canvasElement);&lt;br /&gt;
stage.addEventListener(&#39;stagemousemove&#39;, function(){&lt;br /&gt;
//ドラッグ中にしたい処理&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
シェイプなどのインスタンスをドラッグする際は「pressmove」というイベントらしい。</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/5969057797418222746/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2017/04/createjs.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/5969057797418222746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/5969057797418222746'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2017/04/createjs.html' title='[createjs] ステージ上をドラッグしている途中のマウス位置を取得する'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-5611711285051287199</id><published>2015-04-19T10:45:00.002+09:00</published><updated>2015-04-19T10:45:23.551+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><title type='text'>keyframesアニメーションをメディアクエリの中に書くとIEで動かない</title><content type='html'>keyramesアニメーションを@media ....の中に書くと、IEではそのkeyframesアニメーションが動かない。&lt;br /&gt;
&lt;br /&gt;
keyframesアニメーションはmediaクエリの外に書かないといけない。&lt;br /&gt;
ちょっと引っかかってしまった。&lt;br /&gt;
日本語の情報が見つからなかったのでメモっとこう</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/5611711285051287199/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2015/04/keyframesie.html#comment-form' title='17 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/5611711285051287199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/5611711285051287199'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2015/04/keyframesie.html' title='keyframesアニメーションをメディアクエリの中に書くとIEで動かない'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-5323790363975393063</id><published>2015-02-20T15:50:00.004+09:00</published><updated>2015-02-20T15:50:53.961+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="compass"/><category scheme="http://www.blogger.com/atom/ns#" term="css"/><title type='text'>[compasscss] cssスプライトのファイル名をシンプルにした場合のキャッシュ対策</title><content type='html'>&lt;pre class=&quot;ruby&quot; name=&quot;code&quot;&gt;compassのcssスプライト作成時にファイル名につく乱数を削除して、シンプルな名前にすることができる。&lt;/pre&gt;
&lt;pre class=&quot;ruby&quot; name=&quot;code&quot;&gt;参考：&lt;a href=&quot;http://satussy.blogspot.jp/2013/08/compass-css.html&quot;&gt;[compass] cssスプライト画像のファイル名をシンプルにする&lt;/a&gt;&lt;/pre&gt;
&lt;pre class=&quot;ruby&quot; name=&quot;code&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;ruby&quot; name=&quot;code&quot;&gt;これだとファイルがキャッシュされて、ファイルを変更しても古い画像が表示されてしまう可能性がある。&lt;/pre&gt;
&lt;pre class=&quot;ruby&quot; name=&quot;code&quot;&gt;その場合は下記のコードをconfig.rbに追加。&lt;/pre&gt;
&lt;pre class=&quot;ruby&quot; name=&quot;code&quot;&gt;「**.css?Owoiu93k2djhr」という風にファイル名の後ろに乱数をつけてキャッシュを読み込まないように対策できる。&lt;/pre&gt;
&lt;pre class=&quot;ruby&quot; name=&quot;code&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;ruby&quot; name=&quot;code&quot;&gt;on_stylesheet_saved do |filename|
  if File.exists?(filename)
    css = File.read filename
    File.open(filename, &#39;w+&#39;) do |f|
     rand = rand(100000000)
     str = &#39;.png?&#39; + rand.to_s
      f &amp;lt;&amp;lt; css.gsub(%r{-s[a-z0-9]{10}\.png}, str)
    end
  end
end
# ----------------------------------------
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/5323790363975393063/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2015/02/compasscss-css.html#comment-form' title='1 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/5323790363975393063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/5323790363975393063'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2015/02/compasscss-css.html' title='[compasscss] cssスプライトのファイル名をシンプルにした場合のキャッシュ対策'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-3632660024118564214</id><published>2014-10-23T15:56:00.002+09:00</published><updated>2014-10-23T15:56:30.436+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Application"/><category scheme="http://www.blogger.com/atom/ns#" term="sass"/><title type='text'>preprosの動作が遅い場合の対処法</title><content type='html'>preprosは動作がすごく遅くなる場合がある&lt;br /&gt;
自分の経験だとscssファイルを分割しすぎると遅くなるように感じる&lt;br /&gt;
&lt;br /&gt;
そこは制作方法なので、どうしようもないけどprepros側でできる対応&lt;br /&gt;
&lt;br /&gt;
チェックするサイトを減らす&lt;br /&gt;
プロジェクト一覧の横の緑の○をクリックすると機能をon / offできる&lt;br /&gt;
&lt;br /&gt;
チェックするフォルダを減らす&lt;br /&gt;
プロジェクトを選択&lt;br /&gt;
↓&lt;br /&gt;
下の歯車ボタン（Project Settings）をクリック&lt;br /&gt;
↓&lt;br /&gt;
「Project Filters」をチェック&lt;br /&gt;
↓&lt;br /&gt;
チェックしなくていいフォルダをカンマ区切りで記入&lt;br /&gt;
※フォルダ構成にもよるが、自分はcss, js, sass以外は除外する&lt;br /&gt;
※逆に特定のフォルダだけをチェックするってできたらいいけど。もしかしたら正規表現なども使えるのかも</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/3632660024118564214/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2014/10/prepros.html#comment-form' title='1 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/3632660024118564214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/3632660024118564214'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2014/10/prepros.html' title='preprosの動作が遅い場合の対処法'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-3151901441810204045</id><published>2014-10-17T09:50:00.002+09:00</published><updated>2014-10-17T09:52:58.431+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>jQuery.dataとhtml5のdata-でどちらが速いか試してみた</title><content type='html'>状態や何かしらの値を要素と関連づいた状態で保存したい時がある。&lt;br /&gt;
例えばアコーディオンUIで今開いてる状態か閉じてる状態か…など。&lt;br /&gt;
（アコーディオンの場合はクラス名で良さそうだけど）&lt;br /&gt;
&lt;br /&gt;
思いついたのはjQueryのdataメソッドを使う方法とhtml5のdata-**を使う方法&lt;br /&gt;
どっちが速いのか試してみた&lt;br /&gt;
それぞれ1000回、値を入れた後、取得するというやり方でやってみた。&lt;br /&gt;

&lt;pre class=&quot;js&quot; name=&quot;code&quot;&gt;
/jQueryのdataの場合
$(要素).data(&#39;名前&#39;, 値);
//7ms

//html5のdata-の場合
$(要素).attr(&#39;data-名前&#39;, 値);
//11ms

※chromeで測定
&lt;/pre&gt;

測ってみたらdataを使う方が若干早かったけど、気にしなくてもいい程度だった。&lt;br /&gt;
html5の方がhtmlを変更する分、ずっと遅いのかと思っていたがそんなことなかった。</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/3151901441810204045/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2014/10/jquerydatahtml5data.html#comment-form' title='1 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/3151901441810204045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/3151901441810204045'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2014/10/jquerydatahtml5data.html' title='jQuery.dataとhtml5のdata-でどちらが速いか試してみた'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-1968457872769353994</id><published>2014-10-02T11:08:00.001+09:00</published><updated>2014-10-02T11:10:45.118+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Smarty"/><title type='text'>[smarty] テンプレート側で連想配列をアサインするプラグイン</title><content type='html'>Smarty使ってると、テンプレート側で配列を作りたくなる時がある。&lt;br /&gt;
連想配列をアサインするプラグインを作った。&lt;br /&gt;
&lt;a href=&quot;https://github.com/satussy/smarty-assignArr&quot;&gt;https://github.com/satussy/smarty-assignArr&lt;/a&gt;
ダウンロードしてsmartyのプラグインフォルダに入れれば使えます

&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;//使い方：テンプレートで下のように書く（改行は必要ない。見やすくしてるだけ）
{assignArr
        valName=&quot;hensuumei&quot;
        test1=&quot;テスト1&quot;
        test2=&quot;テスト2&quot;
    }

//中身を見てみると
{$hensuumei|debug_print_var}

array{
  test1 =&amp;gt; &quot;テスト1&quot;,
  test2 =&amp;gt; &quot;テスト2&quot;
}

//というふうに変数が使えるようになる
&lt;/pre&gt;

連想配列じゃない、ただの配列をアサインするやつも作ろう</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/1968457872769353994/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2014/10/smarty.html#comment-form' title='2 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/1968457872769353994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/1968457872769353994'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2014/10/smarty.html' title='[smarty] テンプレート側で連想配列をアサインするプラグイン'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-3911115291880799113</id><published>2014-08-13T13:44:00.002+09:00</published><updated>2014-08-13T13:44:17.478+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="css"/><title type='text'>Android 2.x~で拡大縮小も可能なままposition: fixedを使う方法</title><content type='html'>&lt;b&gt;結論&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;cssのkeyframeアニメーションを使うとposition:fixedが有効になる&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
ちょっとはまってしまったのでメモ&lt;br /&gt;
スマートフォン向けのサイトで、facebookみたいに横から出てくるメニューを作った。&lt;br /&gt;
Androidf 2.x~はそのままではoverflow: scrollもposition:fixedも効かないので、スクロールしたらメニューもそのまま一緒にスクロールされるようにした…はずだった。&lt;br /&gt;
&lt;br /&gt;
が、ある時からメニューがfixedになってしまて、スクロールしても動くのは横にずれていったメインのコンテンツ部分のみ。&lt;br /&gt;
メニューは定位置のまま。それだとウィンドウの外に出てしまったメニューを見ることができない。&lt;br /&gt;
&lt;br /&gt;
viewportにuser-scalable=noと入れるとposition: fixedが効くようになるという話だったが、そんな指定はしていない。&lt;br /&gt;
&lt;br /&gt;
原因を探してみると、どうやらkeyframesアニメーションを使うと、position: fixedが効くようになるらしい。&lt;br /&gt;
拡大縮小もできるようにしたままfixedを使うようにしたい人には使える方法なのかも。</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/3911115291880799113/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2014/08/android-2xposition-fixed.html#comment-form' title='1 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/3911115291880799113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/3911115291880799113'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2014/08/android-2xposition-fixed.html' title='Android 2.x~で拡大縮小も可能なままposition: fixedを使う方法'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-8986193722686365883</id><published>2014-07-23T13:45:00.003+09:00</published><updated>2014-07-23T13:45:32.965+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Font"/><title type='text'>Google Web fontで今後使いたいなと思ったフォント</title><content type='html'>&lt;a href=&quot;https://www.google.com/fonts/specimen/Alfa+Slab+One&quot;&gt;Alfa Slab One&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://www.google.com/fonts/specimen/Bevan&quot;&gt;Bevan&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://www.google.com/fonts/specimen/Luckiest+Guy&quot;&gt;Luckiest Guy&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://www.google.com/fonts/specimen/Sorts+Mill+Goudy&quot;&gt;Sorts Mill Goudy&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://www.google.com/fonts/specimen/Rye&quot;&gt;Rye&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.google.com/fonts/specimen/Diplomata+SC&quot;&gt;Diplomata&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.google.com/fonts/specimen/Jacques+Francois+Shadow&quot;&gt;Jacques Francois Shadow&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.google.com/fonts/specimen/Milonga&quot;&gt;Milonga&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.google.com/fonts/specimen/Sancreek&quot;&gt;Sancreek&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.google.com/fonts/specimen/Slackey&quot;&gt;Slackey&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.google.com/fonts/specimen/Nova%20Square&quot;&gt;Nova Square&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/8986193722686365883/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2014/07/google-web-font.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/8986193722686365883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/8986193722686365883'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2014/07/google-web-font.html' title='Google Web fontで今後使いたいなと思ったフォント'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-8221523940368215349</id><published>2014-07-14T16:23:00.000+09:00</published><updated>2014-07-14T16:23:21.212+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><title type='text'>HTML5で書いているサイトはIE8以下で印刷するとレイアウトが崩れる</title><content type='html'>IE8はhtml5の要素に対応していないので、何も対策しないとレイアウトが崩れまくる。&lt;br /&gt;
なので、IE8以下向けに「html5.js」を読み込ませて対応してる。&lt;br /&gt;
&lt;br /&gt;
それで概ね表示は大丈夫になるんだけど、印刷時には「html5.js」は効かないらしい。&lt;br /&gt;
印刷時にもレイアウトを崩さないようにするためには,「html5shiv-printshiv.js」を読み込ませる必要がある&lt;br /&gt;
&lt;br /&gt;
参考：&lt;a href=&quot;https://code.google.com/p/html5shiv-printshiv/&quot;&gt;https://code.google.com/p/html5shiv-printshiv/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/8221523940368215349/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2014/07/html5ie8.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/8221523940368215349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/8221523940368215349'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2014/07/html5ie8.html' title='HTML5で書いているサイトはIE8以下で印刷するとレイアウトが崩れる'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-7404467070142821016</id><published>2014-06-27T01:14:00.002+09:00</published><updated>2014-06-27T01:15:37.553+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><title type='text'>ログイン時にブラウザが覚えているID,パスワードを入力させない方法</title><content type='html'>ブラウザはログインが必要なサイトで、ID,パスワードを覚えていてくれて、使う際にはすごいありがたいんだけど、どうしても自動で入力をさせずに、手動で入力させたいって場合があった。&lt;br /&gt;
&lt;br /&gt;
具体的にはあまり書けないが、Web上だけで完結するのではなく、Webと連動して対面でサービスを行うキャンペーン時に、ID,パスワードが必要になるため、どうしても対面前に一度、手入力して自分のパスワードを思い出しておいてほしい、という状況。&lt;br /&gt;
&lt;br /&gt;
最初に考えたのはinputのnameを変えるという方法。&lt;br /&gt;
これは機能しなかった。nameを変えてもなぜかブラウザが覚えているID,パスワードが入力されてしまう。&lt;br /&gt;
&lt;br /&gt;
次に考えたのは、Javascriptでinputのvalueを空にする方法&lt;br /&gt;
windowのload時にvalueを空にする処理をしたが、ブラウザが自動入力するのはその後のタイミングらしく、一旦空にした後に、valueがはいってしまった。&lt;br /&gt;
&lt;br /&gt;
次に考えたのが、setIntervalとかで、定期的にinputの値を空にする方法。&lt;br /&gt;
IDのinputにフォーカスされたタイミングでsetIntervalを解除する。&lt;br /&gt;
これは一応うまく動作していたが、iPhoneやAndroid、IEなどブラウザによってはinputのフォーカスイベントがうまく動作しない可能性もあるのでは…と考え、そうなってしまったら、どれだけ手動で入力しても定期的に値を空にされてはたまらんと思いやめた。&lt;br /&gt;
&lt;br /&gt;
最終的にとった方法は&lt;br /&gt;
name=&quot;id&quot;のinputなどの他にname=&quot;id-2&quot;、name=&quot;password-2&quot;などのinputを作り、それを見えないように設置するという方法。&lt;br /&gt;
これをやると似た名前のどちらかにしか値が入らなくなった。&lt;br /&gt;
ただ、先に（または後に）記述されている方のinputに…とかではなく、ブラウザによってはidは先に書かれたinputに、パスワードは後に書かれたinputに…となってしまっていた。&lt;br /&gt;
複数のブラウザで試行錯誤して順番を変え、正しいinputには値が入らない順番を探した。&lt;br /&gt;
どういった法則があるのかはわからずじまい。&lt;br /&gt;
&lt;br /&gt;
cssでdisplay:noneにしてしまうとブラウザがそのinputを無視してしまうようで、height: 0; width:0; position: absolute; top: 0; right: 0;などとして、見た目上は見つからないようにして対応した。</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/7404467070142821016/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2014/06/id.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/7404467070142821016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/7404467070142821016'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2014/06/id.html' title='ログイン時にブラウザが覚えているID,パスワードを入力させない方法'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-3457742429226327784</id><published>2014-04-15T14:19:00.000+09:00</published><updated>2015-04-19T10:46:35.902+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="WordPress"/><title type='text'>iosでcssでhover処理を入れていたaタグがクリック出来ない</title><content type='html'>タイトルの通り、hover処理を入れているaタグがiPhoneでクリックできなくなってた。&lt;br /&gt;
原因がわからなかったので対症療法でしか対応できなかった。&lt;br /&gt;
&lt;br /&gt;
以下対応方法です。&lt;br /&gt;
クリックイベントが起きなくなってしまっていたので、touchstartでaタグのhrefを取って、ページを移動させてます。
&lt;br /&gt;
&lt;pre class=&quot;js&quot; name=&quot;code&quot;&gt;$(&#39;a&#39;).on &#39;touchstart&#39;, -&amp;gt;
 location.href = this.getAttribute(&#39;href&#39;)
&lt;/pre&gt;
hover時にdisplay:blockしているaタグ要素の中身を表示させたりしているので、それが絡んでるんだと思います。&lt;br /&gt;
同じような状況になって、解決出来たって人いたら教えてください。&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/3457742429226327784/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2014/04/wordpress-ioscsshovera.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/3457742429226327784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/3457742429226327784'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2014/04/wordpress-ioscsshovera.html' title='iosでcssでhover処理を入れていたaタグがクリック出来ない'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-5980877399357861140</id><published>2014-04-08T20:39:00.002+09:00</published><updated>2014-04-08T20:39:57.076+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><title type='text'>[js] IEのデバッグコンソールでJavaScriptのオブジェクトなどの中身を見たい</title><content type='html'>console.logを使ってオブジェクトの中身を見たい！って時に、IEは[Object object]なんていう文字列を吐いてくる。&lt;br /&gt;
で、中身は見れず。&lt;br /&gt;
&lt;br /&gt;
その対策。&lt;br /&gt;
console.log(JSON.stringify(中身見たい変数など));&lt;br /&gt;
&lt;br /&gt;
1行の文字列になるけど、これで中身は見れる</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/5980877399357861140/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2014/04/js-iejavascript.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/5980877399357861140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/5980877399357861140'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2014/04/js-iejavascript.html' title='[js] IEのデバッグコンソールでJavaScriptのオブジェクトなどの中身を見たい'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-746326310558406070</id><published>2014-03-14T17:06:00.005+09:00</published><updated>2014-04-15T14:21:00.633+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>[jQuery] 取得済みの要素を合体させて操作する</title><content type='html'>jQueryで取得した2つの要素をまとめて、同じ処理をしたいって時がある。&lt;br /&gt;
&lt;br /&gt;
先に取得していた要素1と後から取得した要素2に対して、途中までは別々の処理をするのだが、途中からは同じ処理をする…など。&lt;br /&gt;
&lt;br /&gt;
はじめに2つまとめて取って、その中から要素をわける方がいいのかもしれないけど、処理の流れによっては…後からまとめる方がスッキリしたりする場合もあるかも
&lt;br /&gt;
&lt;pre class=&quot;js&quot; name=&quot;code&quot;&gt;var $elem1 = $(&#39;.elem-1&#39;);
var $elem2 = $(&#39;.elem-2&#39;);
var $matome = $([$elem1.get(0), $elem2.get(0)]);

$matome.css... //2つの要素をまとめて処理する
&lt;/pre&gt;
console.timeで時間測ってみたが、chromeではまとめる方が、新たにまとめて取得するより、3倍くらい速かった。</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/746326310558406070/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2014/03/jquery.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/746326310558406070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/746326310558406070'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2014/03/jquery.html' title='[jQuery] 取得済みの要素を合体させて操作する'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-4305384570562788654</id><published>2014-02-10T18:07:00.002+09:00</published><updated>2014-02-10T18:07:56.285+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><title type='text'>iPhoneでiframeがはみ出してしまう</title><content type='html'>twitterのウィジェットを使っているサイトをiPhoneで見ると、twitterのiframeが画面の外まで伸びてしまっていた。&lt;br /&gt;
&lt;br /&gt;
cssではmax-width: 100%;と指定している。&lt;br /&gt;
Androidでは問題なく表示されていたが、iPhoneではどうもうまく動かないらしい。&lt;br /&gt;
&lt;br /&gt;
いろいろcssを変更してみた感じだと、width,max-widthの値を％で指定するとうまく効いてくれないみたい。&lt;br /&gt;
px指定だとちゃんと変更された。&lt;br /&gt;
&lt;br /&gt;
親要素の問題かもしれない。&lt;br /&gt;
ちょっと調べてみよう。</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/4305384570562788654/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2014/02/iphoneiframe.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/4305384570562788654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/4305384570562788654'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2014/02/iphoneiframe.html' title='iPhoneでiframeがはみ出してしまう'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-1475883780216960517</id><published>2014-01-20T11:34:00.002+09:00</published><updated>2014-04-15T14:21:53.120+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><title type='text'>[javascript] PreprosでZeptoを連結させるとエラーになった</title><content type='html'>普段、Preprosを使って、読み込むJavaScriptファイルを１つのファイルに連結してよみこんでるんだけど、Zeptoでそれをやったらエラーになった。&lt;br /&gt;
&lt;br /&gt;
対応策は簡単&lt;br /&gt;
ZeptoのJSの最後に;（セミコロン）を追加するだけ。&lt;br /&gt;
&lt;br /&gt;
処理が終わっていないと認識されてエラーになっていたみたい。&lt;br /&gt;
これだとZeptoをバージョンアップさせるたびにやらないといけなくなるな…&lt;br /&gt;
&lt;br /&gt;
Zeptoだけ別ファイルで読みこめば問題は起きないが、読み込むファイルは減らしたい…&lt;br /&gt;
&lt;br /&gt;
さすがにライブラリをバージョンアップしといて動作確認せずにファイルを更新…なんてことはないだろうとたかを括って、今回は１つに連結してやることにした。</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/1475883780216960517/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2014/01/javascript-preproszepto.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/1475883780216960517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/1475883780216960517'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2014/01/javascript-preproszepto.html' title='[javascript] PreprosでZeptoを連結させるとエラーになった'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-1050983843549422538</id><published>2013-12-27T10:49:00.003+09:00</published><updated>2013-12-27T10:50:36.896+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>[jQuery] position()で位置が取得できない</title><content type='html'>サイト内で使用している画像を保存させたくない場合に、透明のgif画像を指定の画像の上にかぶせて保存させづらく処理をした。&lt;br /&gt;
&lt;br /&gt;
その際、jQueryのposition関数で画像の位置を取得していたのだが、場合によってかぶせる透明画像の位置がうまく重ならず、左にずれてしまうことがあった。&lt;br /&gt;
&lt;br /&gt;
調べてみるとposition()で取得した値がtop, leftともに期待していたものと違っていた。&lt;br /&gt;
&lt;br /&gt;
今回の対策としてはposition()をoffset()に変更することで対応できた。&lt;br /&gt;
&lt;br /&gt;
position()の場合、スタイルのpositionがrelative, absolute, fixedになってる直近の親要素の左上を起点にして、相対的な位置を返してくるようだ。&lt;br /&gt;
htmlタグまでさかのぼってpositionがすべてstaticのままだったらhtmlタグが起点になる&lt;br /&gt;
&lt;br /&gt;
offset()の場合、先祖要素のposition()は無視して、ページの左上からの位置を返すらしい。&lt;br /&gt;
&lt;br /&gt;
なので、position()をoffset()に変えれば常にうまくいくというものでもなく、用途によって使い分ける必要があるようだ。&lt;br /&gt;
参考：&lt;a href=&quot;http://d.hatena.ne.jp/cyokodog/20090224/jQueryPosSet01#pos2_offset&quot;&gt;jQuery の位置・サイズ関連メソッドまとめ&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/1050983843549422538/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2013/12/jquery-position.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/1050983843549422538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/1050983843549422538'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2013/12/jquery-position.html' title='[jQuery] position()で位置が取得できない'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-7902481487784443971</id><published>2013-10-22T19:39:00.001+09:00</published><updated>2013-10-22T19:39:35.652+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="compass"/><category scheme="http://www.blogger.com/atom/ns#" term="sass"/><title type='text'>preprosでJavaScriptを連結させる</title><content type='html'>最近preprosを使ってます。&lt;br /&gt;
windows版codekitなんて呼ばれてるらしいす。&lt;br /&gt;
自分はmacなんですが、無料なんでcodekitじゃなくてこっちを使ってます。&lt;br /&gt;
いろいろ便利なツールを世界中の人々が開発してくれていて、とてもありがたや&lt;br /&gt;
&lt;br /&gt;
複数のJavaScriptファイルを連結させて1つのファイルにしたかった。&lt;br /&gt;
日本語で紹介してるブログなんかを読むと、「JSの連結・圧縮もできます（やったね！）」みたいなこと書いてるんですが、実際のやり方書いてるとこは見つからんかったです&lt;br /&gt;
&lt;br /&gt;
公式サイト見たらもちろん書いてました。
&lt;pre name=&quot;code&quot; class=&quot;js&quot;&gt;
//jsファイルに↓こう書くと…
//@prepros-append first.js
//first.jsの中身がここに書かれる。頭のスラッシュ2つも必要です。

//↓prependもある。↑上のappendよりも先に記述される
//@prepros-prepend second.js
&lt;/pre&gt;
指定した箇所に、ファイルの中身が圧縮された状態で追加されるので、他の箇所には普通に処理を書いたりもできます。
&lt;pre name=&quot;code&quot; class=&quot;js&quot;&gt;
$(function(){
 console.log(&#39;uoooooooOOOOOOUU!!!!!!&#39;);
 //@prepros-append second.js
 console.log(&#39;GYAAAAAAAaaaaaaaaa…….&#39;);
})
&lt;/pre&gt;
codekitのも使えるよ、とのこと。&lt;br /&gt;
//@codekit-prepend ***.js&lt;br /&gt;
//@codekit-append ***.js&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
デフォルトではjs/min/にファイルを書き出すようです。

参考：&lt;a href=&quot;http://alphapixels.com/prepros/docs/js-concat-minify.html&quot;&gt;公式サイトJS連結に関するページ&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/7902481487784443971/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2013/10/preprosjavascript.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/7902481487784443971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/7902481487784443971'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2013/10/preprosjavascript.html' title='preprosでJavaScriptを連結させる'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-5018211385488770902</id><published>2013-09-30T18:28:00.002+09:00</published><updated>2013-09-30T18:37:22.086+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><title type='text'></title><content type='html'>[bootstrap] Zeptoとbootstrapを一緒に使おうとしてエラーが出た場合の対処&lt;br /&gt;
&lt;br /&gt;
bootstrap.jsはjQueryありきで書かれている箇所があるので、Zeptoに変えるとエラーが出る。&lt;br /&gt;
その際の対処法

&lt;pre name=&quot;code&quot; class=&quot;js&quot;&gt;
&lt;script&gt;
if(!window.jQuery) {
 Zepto.browser = {webkit: true};
 window.jQuery = Zepto;
}
&lt;/script&gt;
&lt;/pre&gt;

グローバルのjQueryをZeptoで上書き。
bootstrap バージョン2.3ではこれでOKだった。

参考：&lt;a href=&quot;http://stackoverflow.com/questions/16160755/using-bootstrap-with-zepto-undefined-is-not-a-function&quot;&gt;http://stackoverflow.com/questions/16160755/using-bootstrap-with-zepto-undefined-is-not-a-function&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/5018211385488770902/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2013/09/bootstrap-zeptobootstrap-bootstrap.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/5018211385488770902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/5018211385488770902'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2013/09/bootstrap-zeptobootstrap-bootstrap.html' title=''/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-3631247834454881387</id><published>2013-09-30T15:46:00.004+09:00</published><updated>2013-09-30T15:47:31.826+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="compass"/><category scheme="http://www.blogger.com/atom/ns#" term="css"/><title type='text'>[compass]rgbaが使えない古いブラウザ向けにも対応できるcompassのプラグイン</title><content type='html'>バージョン8以前のIEはcssでrgbaが使えない。&lt;br /&gt;
いちいち画像作るのも面倒だったので、探してみたら、IE8以前向けに、自動で画像を作ってcssもつけてくれるプラグインを見つけた。&lt;br /&gt;
&lt;br /&gt;
参考：&lt;a href=&quot;https://github.com/aaronrussell/compass-rgbapng&quot;&gt;https://github.com/aaronrussell/compass-rgbapng&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
■インストールが必要&lt;br /&gt;
gem install compass-rgbapng&lt;br /&gt;
&lt;br /&gt;
■config.rbに下記を追加&lt;br /&gt;
require &quot;rgbapng&quot;&lt;br /&gt;
&lt;br /&gt;
■cssファイルに下記を追加&lt;br /&gt;
@import &quot;rgbapng&quot;;&lt;br /&gt;
&lt;br /&gt;
■変数の設定&lt;br /&gt;
$rgbapng_path: &#39;my_pngs&#39;;　//自動で作ってくれる画像を格納するフォルダ名&lt;br /&gt;
$rgbapng_px_size: 8; //作成する画像のサイズ&lt;br /&gt;
&lt;br /&gt;
■新しく追加されたMIXINを使うと動作する&lt;br /&gt;
rgba-background($color, [$path, $pixel]);&lt;br /&gt;
&lt;br /&gt;
これが&lt;br /&gt;
@include rgba-background(rgba(0,0,0,0.75));&lt;br /&gt;
&lt;br /&gt;
こうなる&lt;br /&gt;
background: url(&#39;/images/rgbapng/000000bf.png?1282127952&#39;);&lt;br /&gt;
background: rgba(0, 0, 0, 0.75);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IE6には対応していないようで、もしIE6を使いたいなら‥&lt;br /&gt;
・DD_BelatePNGを使う&lt;br /&gt;
・自分でIE独自フィルターを使ったMIXINを作る&lt;br /&gt;
・&lt;a href=&quot;http://stuffandnonsense.co.uk/blog/about/universal_internet_explorer_6_css&quot;&gt;Universal styesheet&lt;/a&gt;を使う&lt;br /&gt;のどれかを選んだらと言ってくれてます。</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/3631247834454881387/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2013/09/compassrgbacompass.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/3631247834454881387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/3631247834454881387'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2013/09/compassrgbacompass.html' title='[compass]rgbaが使えない古いブラウザ向けにも対応できるcompassのプラグイン'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-1335351413545374175</id><published>2013-09-18T14:10:00.002+09:00</published><updated>2013-09-18T14:10:59.824+09:00</updated><title type='text'>firefoxでYouTubeの埋め込みプレーヤーが表示されない</title><content type='html'>YouTubeの埋め込みプレーヤーがfirefoxでだけ表示されない現象があった。&lt;br /&gt;
使ったのはiframeを使う埋め込みコード。&lt;br /&gt;
他のブラウザでは問題なく見れる。&lt;br /&gt;
&lt;br /&gt;
HTMLではちゃんと存在するのだが、見た目は真っ黒。&lt;br /&gt;
最初はFLASHのバグかと思っていたのだが、実際はcssとの関係で起きた問題だった。&lt;br /&gt;
&lt;br /&gt;
原因は埋め込みコードを書いた箇所の親要素に、transform:translate3dを適用させていたことだった。&lt;br /&gt;
これが適用されていると、YouTubeのプレイヤーが真っ黒になったままになる。&lt;br /&gt;
&lt;br /&gt;
なぜそうなるのか、具体的な原因はまだわかっていないんだけど、とりあえずの原因。&lt;br /&gt;
&lt;br /&gt;
どうしてもtransform:translate3dを使わないといけない場合はどうすればいいんだろう？&lt;br /&gt;
YouTubeのAPIで動画のデータを取得して、動画ファイルを直接videoタグで表示させるとかがいいのかな。&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/1335351413545374175/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2013/09/firefoxyoutube.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/1335351413545374175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/1335351413545374175'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2013/09/firefoxyoutube.html' title='firefoxでYouTubeの埋め込みプレーヤーが表示されない'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-1099840896421037817</id><published>2013-09-11T11:27:00.002+09:00</published><updated>2013-09-18T14:12:13.754+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><title type='text'>windowsのメディアクエリによるリサイズとJavaScriptで登録したリサイズイベントのタイミング</title><content type='html'>レスポンシブデザインのサイトで使用するスライドショー的なものを作成した。&lt;br /&gt;
ウインドウサイズによって、レイアウトが変わるので、スライドショーもそれに合わせてリサイズするようにした&lt;br /&gt;
スライドショー側では、リサイズ後の要素のサイズを取得して、それをもとにスライダーのりサイズ処理をした。&lt;br /&gt;
そこがうまく動かない。&lt;br /&gt;
要素のサイズの取得がうまくいっていなかった&lt;br /&gt;
&lt;br /&gt;
ウインドウを小さくすると、メディアクエリで設定してあるウインドウサイズでレイアウトが変わる。&lt;br /&gt;
その瞬間にJSで取得したサイズをconsole.logで見てみると…&lt;br /&gt;
&lt;br /&gt;
レイアウトが変わる前のサイズが取得されていた。&lt;br /&gt;
つまり、cssの設定が反映される前に、JSのサイズ取得の処理が動いたようだ。&lt;br /&gt;
&lt;br /&gt;
Macでは起きず、WindowsでもIEとfirefoxでのみ起きる現象だった。&lt;br /&gt;
俺のイメージと違った順序で進んでいたようなのでメモ。&lt;br /&gt;
&lt;br /&gt;
レイアウト変更後のサイズ取得をsetTimeoutで少し遅らせることで対応した。</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/1099840896421037817/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2013/09/windowsjavascript.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/1099840896421037817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/1099840896421037817'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2013/09/windowsjavascript.html' title='windowsのメディアクエリによるリサイズとJavaScriptで登録したリサイズイベントのタイミング'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-332765655037340193</id><published>2013-09-09T19:36:00.002+09:00</published><updated>2013-09-09T19:42:38.528+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Movie"/><title type='text'>[js] Youtubeプレイヤーのクリックイベント登録</title><content type='html'>あるミュージシャンのサイトでsoundManagerを使って音楽を再生できるようにした。&lt;br /&gt;
ページによってはYouTubeが貼られてあるページがあって、YouTubeを再生する時にはBGMは停止することになった。&lt;br /&gt;
&lt;br /&gt;
iPadやらも対象になっているのでYouTubeはiframeで埋め込んでる。&lt;br /&gt;
当然iframe内はYouTubeのドメインになっているので、JavaScriptで中を覗くことも、プレイヤーにクリックイベントを登録することもできない。&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;pre name=&quot;code&quot; class=&quot;js&quot;&gt;
do -&gt;
 # iframeがひとつしかない状態でしか確認してないので、複数ある場合は要注意
 $iframes = $(&#39;iframe&#39;)
 $ytFrames = $iframes.filter -&gt;
  # facebookのiframeなどもあるのでsrcをチェック
  if this.src.indexOf &#39;youtube.com&#39; != -1
   srcParts = this.src.split &#39;/&#39;
   id = srcParts.pop().split(&#39;?&#39;)[0]
   # YoutubeのAPIで使用するので、動画IDを保存しておく
   this.setAttribute &#39;data-movieid&#39;, id
   # iframeを作り変えるので、その格納用divを作成＆挿入
   $(this).after &#39;&lt;div id=&quot;ytframe-&#39; + id + &#39;&quot;&gt;&lt;/div&gt;&#39;
   return true

 # youtubeのiframeがなければやめる
 if $ytFrames.size() == 0
  return

 #　後々取得しやすいyにクラス名追加
 $ytFrames.addClass &#39;js-yt-frame&#39;

 # ここはドキュメントに書いてあった。iframeのAPIを使用するために必要なscriptを読み込む
 tag = d.createElement &#39;script&#39;
 tag.src = &#39;https://www.youtube.com/iframe_api&#39;
 $(&#39;head&#39;).append tag

# scriptが読み込まれると、この名前の関数が呼ばれる
@onYouTubeIframeAPIReady = -&gt;
 # 判別用につけたクラス名で取得
 $ytFrames = $(&#39;.js-yt-frame&#39;)
 $ytFrames.each -&gt;
  $this = $(this)
  # 既存のiframeを新しく作るものと置き換えるので一旦非表示
  $this.hide()
  frame = this
  movieId = frame.getAttribute &#39;data-movieid&#39;
  #　APIにあるオブジェクトをnew。これでiframeが作られる
  player = new YT.Player &#39;ytframe-&#39; + movieId,
   # 幅・高さともに200px以上ないと再生できないので、最低値を設定
   width: Math.max(frame.getAttribute(&#39;width&#39;), 200)
   height: Math.max(frame.getAttribute(&#39;height&#39;), 200)
   videoId: movieId
   events:
    onReady: (e)-&gt;
     # もともとあったiframeを削除
     $this.remove()
    onStateChange: (e)-&gt;
     # クリックイベント登録
     if e.data == YT.PlayerState.PLAYING
      # 動画が再生状態になった場合の処理
      # 今回はここでsoundManagerを止めた。

     # もちろん停止状態になったら…とかも可能
&lt;/pre&gt;

参考サイト：&lt;a href=&quot;https://developers.google.com/youtube/iframe_api_reference?hl=ja&quot;&gt; YouTube Player API Reference for iframe Embeds(英語)&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/332765655037340193/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2013/09/js-youtube.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/332765655037340193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/332765655037340193'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2013/09/js-youtube.html' title='[js] Youtubeプレイヤーのクリックイベント登録'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-3603675528331202206</id><published>2013-08-22T17:23:00.001+09:00</published><updated>2013-08-22T17:27:17.796+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="compass"/><title type='text'>[compass] cssスプライト画像のファイル名をシンプルにする</title><content type='html'>compassでcssスプライト画像を作ると、ファイル名が「sprite-918734128374.png」って感じになる。&lt;br /&gt;
しかもsass内のこのスプライト箇所が更新されると、ファイル名も変わる。&lt;br /&gt;
これは名前を変えないと各ブラウザにキャッシュされている古い状態の画像が出てしまうことへの対策だと思うんだけど、運営していく上ではちょっと面倒…。&lt;br /&gt;
&lt;br /&gt;
・cssファイルだけでなく画像ファイルもアップしないといけない&lt;br /&gt;
・サーバ上の古い画像を削除しないといけない&lt;br /&gt;
&lt;br /&gt;
…書いてみると、それくらい面倒臭がらずにやれやって感じもするが…面倒くさがりなのは、ある種の美徳らしいのでいいことなはず。&lt;br /&gt;
&lt;br /&gt;
他には&lt;br /&gt;
・compass以外で画像もcssも変更しづらくなる&lt;br /&gt;
ってのもあるけど、これはできればcompass以外で作業しないといけない状況になること自体を避けた方が良さそう。&lt;br /&gt;
&lt;br /&gt;
で、ファイル名をシンプルに「sprite.png」とかにする方法&lt;br /&gt;
config.rbに下記を追加する
&lt;pre name=&quot;code&quot; class=&quot;ruby&quot;&gt;
on_sprite_saved do |filename|
  if File.exists?(filename)
    FileUtils.cp filename, filename.gsub(%r{-s[a-z0-9]{10}\.png$}, &#39;.png&#39;)
  end
end

on_stylesheet_saved do |filename|
  if File.exists?(filename)
    css = File.read filename
    File.open(filename, &#39;w+&#39;) do |f|
      f &lt;&lt; css.gsub(%r{-s[a-z0-9]{10}\.png}, &#39;.png&#39;)
    end
  end
end
&lt;/pre&gt;


参考：&lt;a href=&quot;http://stackoverflow.com/questions/9183133/how-to-turn-off-compass-sass-cache-busting/9332472&quot;&gt;How to turn off COMPASS SASS cache busting?&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/3603675528331202206/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2013/08/compass-css.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/3603675528331202206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/3603675528331202206'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2013/08/compass-css.html' title='[compass] cssスプライト画像のファイル名をシンプルにする'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-5707744455053107286</id><published>2013-08-09T20:05:00.000+09:00</published><updated>2013-08-12T16:11:15.834+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><title type='text'>PC版safariでcssアニメーションするとちらつく</title><content type='html'>Macのsafariでcssアニメーションさせると、そのアニメーションする要素とは別の部分がちらつくという症状がでた。&lt;br /&gt;
iPhoneではなくPC。&lt;br /&gt;
具体的な原因ははっきりわからなかったんだけど、transfrom:rotateをアニメーションさせているのをやめたらちらつきは解消された。&lt;br /&gt;
&lt;br /&gt;
チラツキが起きるのはアニメーションの始まる瞬間と終わる瞬間。&lt;br /&gt;
アニメーションの途中は問題なし。&lt;br /&gt;
検索しても同じような症状の人は見つからず…&lt;br /&gt;
&lt;br /&gt;
--追記&lt;br /&gt;
原因はまだ良くわかってないんですが、対処法は見つかった。簡単。&lt;br /&gt;
&lt;span style=&quot;color: #b9bdb6; font-family: Consolas, Bitstream Vera Sans Mono, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 15.390625px; white-space: pre;&quot;&gt;-webkit-backface-visibility: hidden;
&lt;/span&gt;&lt;/span&gt;↑これを追加するだけ。場合によっては、子要素にも適応させないとだめかも。&lt;br /&gt;
参考：&lt;a href=&quot;http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/css3-animations-the-hiccups-and-bugs-youll-want-to-avoid/&quot;&gt;CSS3 Animations: the Hiccups and Bugs You’ll Want to Avoid（英語）&lt;/a&gt;&lt;br /&gt;
-- ココマデ&lt;br /&gt;
&lt;br /&gt;
以下、勝手な推測…&lt;br /&gt;
rotateをアニメーションさせようとするとアクセラレータが効いてGPUを使うようになる。&lt;br /&gt;
アニメーション終わるとGPUの使用も終了。&lt;br /&gt;
CPUとGPUの切り替えの瞬間にちらつく。&lt;br /&gt;
&lt;br /&gt;
同じ動きをしているのにページによってチラツキが起きないページもあったので、ちらついていたのは画面全体ではなく、何かしら条件が揃った要素のみっぽい。&lt;br /&gt;
&lt;br /&gt;
結果的にrotateやめたら、そっちの方が好きな動きだったんで結果オーライ&lt;br /&gt;&lt;br /&gt;--add&lt;br /&gt;
他にもskewをcssアニメーションしたらちらついたとか…いろいろ。&lt;br /&gt;
ずっとChromeでしか確認しないまま作業進めて、そろそろ大詰めってころからsafariでの確認を開始したのが仇になった。&lt;br /&gt;
チラツキの原因を探るのに手間がかかってしまう。&lt;br /&gt;
cssアニメーションさせるならsafariメインで確認したほうが良さそう。</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/5707744455053107286/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2013/08/pcsafaricss.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/5707744455053107286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/5707744455053107286'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2013/08/pcsafaricss.html' title='PC版safariでcssアニメーションするとちらつく'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5039078013010092514.post-4360921282110037160</id><published>2013-08-08T12:33:00.002+09:00</published><updated>2013-08-08T12:34:14.201+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="TweenMax.js"/><title type='text'>[TweenMax.js] TweenMaxでのアニメーションの連結</title><content type='html'>tween.jsを使ってみようと思っていて、気づいたらTweenMaxを触ってしまっていた。&lt;br /&gt;
&lt;br /&gt;
正直、同じもんだろ？と勘違いしてました。&lt;br /&gt;
&lt;br /&gt;
結局どっちをメインに使って見るかは軽く触ってから判断しようかと&lt;br /&gt;
&lt;br /&gt;
で、tweenMaxのアニメーション連結方法&lt;br /&gt;
&lt;pre class=&quot;js&quot; name=&quot;code&quot;&gt;
//複数のアニメーションを連結する場合はtimelineを使う
tl = new TimelineLite()
elem = document.getElementById &#39;id&#39;
tl.to(elem, 0.4, {bottom: &#39;11px&#39;})
.to(elem, 1, {bottom: 0})
&lt;/pre&gt;

タイムラインは独立したオブジェクトって考えなのかな。</content><link rel='replies' type='application/atom+xml' href='http://satussy.blogspot.com/feeds/4360921282110037160/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://satussy.blogspot.com/2013/08/tweenmaxjs-tweenmax.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/4360921282110037160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5039078013010092514/posts/default/4360921282110037160'/><link rel='alternate' type='text/html' href='http://satussy.blogspot.com/2013/08/tweenmaxjs-tweenmax.html' title='[TweenMax.js] TweenMaxでのアニメーションの連結'/><author><name>satoc</name><uri>http://www.blogger.com/profile/10123027248461805989</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>