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
| fs = require 'fs' | |
| {exec, spawn} = require 'child_process' | |
| {parser, uglify} = require 'uglify-js' | |
| files = [] | |
| # 該当パスのファイルを取得するやつ | |
| get_file = (path) -> | |
| text = '' | |
| stat = fs.statSync(path) | |
| if stat.isDirectory() |
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 imageList = ['top/a.png', 'top/b.png', 'top/c.png'],l = imageList.length, i = 0; | |
| for(; i < l; i++) { | |
| $('<img/>')[0].src = imageList[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
| // 設定されたbackground-imageのurlを無効にする場合 | |
| $('#hoge').css('background-image', 'none'); | |
| // background-imageのurlを変更する場合 | |
| $('#hoge').css('background-image', 'url(test.png)'); |
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 elm = $('div.hoge'); | |
| elm | |
| .find('span.count').remove() | |
| .end() | |
| .css({'z-index': 100, | |
| 'position': 'absolute', | |
| 'left': '10px', | |
| 'top': '20px' | |
| }) | |
| .find('img') |
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
| // jQueryで以下のコードを実行したら、IE7だけ効かなかった | |
| $(ui.helper) | |
| .find('img') | |
| .attr({'width': '100px', 'height': '100px'}) | |
| .end() | |
| .find('span.count').remove(); | |
| // IE7はimgのwidth, heightが変わらない | |
| // attr->cssに変更したら解決 |
NewerOlder