This file contains hidden or 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
| var canvas = document.getElementById("testCanvas"); | |
| var stage = new createjs.Stage(canvas); | |
| var letters = ["test", "日本語", "abcカタカナ", "1234567890"]; | |
| for (var i = 0, iz = letters.length; i < iz; i++) { | |
| var label = new foo9.createjs.Label(letters[i], "12px Arial", "#000", "#fff"); | |
| stage.addChild(label); | |
| label.y = 20 * i; | |
| } |
This file contains hidden or 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
| !!! 5 | |
| %html | |
| %head | |
| %meta(charset="utf-8") | |
| %title="demo" | |
| %script(src="http://code.createjs.com/createjs-2013.02.12.min.js") | |
| %script(src="foo9.createjs.tooltip.js") | |
| :css | |
| canvas { | |
| background: #abc; |
This file contains hidden or 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
| execute pathogen#infect() | |
| syntax on | |
| filetype plugin indent on | |
| autocmd vimenter * NERDTree | |
| autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif | |
| set nocompatible | |
| set fileformats=unix,dos,mac | |
| set title |
This file contains hidden or 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, input[type="button"], input[type="submit"], button').on('touchstart', function() { | |
| $(this).addClass('hover'); | |
| }).on('touchend', function() { | |
| $(this).removeClass('hover'); | |
| }); |
This file contains hidden or 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 () { | |
| var dotSize = 3; | |
| var dotColor = "#abc"; | |
| var canvas = $("<canvas/>").attr({ | |
| width: dotSize * 2, | |
| height: dotSize * 2 | |
| })[0]; | |
| var ctx = canvas.getContext('2d'); | |
| ctx.fillStyle = dotColor; | |
| ctx.beginPath(); |
This file contains hidden or 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
| // uncompress | |
| ;(function ($) { | |
| $.fn.visible = function (visible, invisible) { | |
| if ((typeof visible !== "function") && (typeof invisible !== "function")) { | |
| return this; | |
| } | |
| return this.each(function () { | |
| if ($(this).css('display') === 'none') { | |
| invisible.apply(this); |
This file contains hidden or 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
| var selectElems = document.getElementsByTagName("select"); | |
| for (var i = 0, iz = selectElems.length; i < iz; i++) { | |
| selectElems[i].onfocus = selectElems[i].blur; | |
| } |
This file contains hidden or 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
| <form> | |
| <input type="checkbox" checked="checked" /> | |
| <input type="checkbox" /> | |
| </form> |
This file contains hidden or 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
| var elementId = "testCanvas"; | |
| var stageWidth = 300; | |
| var stageHeight = 300; | |
| var backgroundColor = "#abc"; | |
| var stage; | |
| function init() { | |
| var canvas = document.getElementById(elementId); | |
| canvas.style.width = stageWidth + "px"; |
This file contains hidden or 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(a){a.fn.simpletab=function(){return this.each(function(){for(var b,c,d,e,f=a(this).find("a"),g=0,h=f.length;h>g;g++)c=a(f[g]),d=c.attr("href"),d=a(d),d.hide().bind("stactive stinactive",function(b,c){e=a(this),c=="#"+e.attr("id")&&("stactive"==b.type?e.show():e.hide())}),c.hasClass("active")&&d.show();f.click(function(){if(e=a(this),!e.hasClass("active")){a.event.trigger("stactive",[e.attr("href")]);for(var d=0,g=f.length;g>d;d++)b=f[d],c=a(b),b!=this?(c.removeClass("active"),a.event.trigger("stinactive",[c.attr("href")])):c.addClass("active")}})})}})(jQuery); |