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
$list: hoge dame; | |
@each $val in $list { | |
.{$val} fuga yap { | |
display: none; | |
} | |
} |
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
for (var i = 1; i < 4 ; i++) { | |
var listN = eval("list_"+ i); | |
var cntN = eval("cnt_"+ i); | |
$(listN).click(function(){ | |
// ここのcntNは実行時に参照される = cntNが書き換わっているとその値を読んでしまう | |
// ので値を設定した関数を作ってあげる必要がある | |
$(cntN).animate( | |
{width: "toggle"}, | |
"fast", | |
"easeInQuart" |
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
var eventHandler = { | |
handleEvent: function(ev) { | |
switch (ev.type) { | |
case 'click': | |
this.click(); | |
break; | |
case 'touchstart': | |
this.touch(); | |
break; | |
} |
NewerOlder