continued line
-removed line
+added line
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
| // 注意: 動かしてない、想像で書いてるコードです。 | |
| // "_off"を含む画像ファイルを検索 | |
| $('img[src~=_off]').each(function (index, elem) { | |
| // 画像URL取得 | |
| var offSrc = elem.src; | |
| // _onな画像URLを生成 | |
| var onSrc = offSrc.replace('_off', '_on'); | |
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 tds = document.querySelectorAll('td'); | |
| for (var i=0,l=tds.length; i<l; i++) { | |
| tds[i].addEventListener('click', function(event) { | |
| this.querySelector('input').checked = true; | |
| }, false); | |
| } |
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
| /** | |
| * @param {HTMLElement} elem | |
| * @param {String} name | |
| * @param {Object} [data] | |
| * @param {Boolean} [pvt] It will be `true` if called in _data not data | |
| */ | |
| function internalData( elem, name, data, pvt /* Internal Use Only */ ){ | |
| if ( !jQuery.acceptData( elem ) ) { | |
| return; | |
| } |
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
| /** | |
| * Runs the function immediately. | |
| * @param {Array} [args] Arguments for the function. | |
| * @param {Object} [context] Context for the function. | |
| * @param {Function} fn Target function. | |
| * @returns {Any} Value returned by the function. | |
| * @example run(function(){ console.log('done!'); }); | |
| * @example run([1,2], function(a,b){ return a+b; }); | |
| * @example var date = Date.now(); run([Date.now()], {start:date}, function(stop){ return stop-this.start; }); | |
| */ |
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
| // ./Gruntfile.js | |
| module.exports = function(grunt) { | |
| grunt.loadTasks('hoge'); | |
| }; |
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 PageModel = Backbone.Model.extend({ }); | |
| var PageView = Backbone.View.extend({ | |
| events: { | |
| 'click .other-page': 'open' | |
| }, | |
| initialize: function() { | |
| this.models = {}; | |
| }, |
this.isThe('code');
-removed('code');
+added('code');
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
| "<{value}{value}{value}>" | |
| .match(/^(.*?)(?:{(\$)?(\w+)})(.*?)$/) | |
| "<{?cond}ttt{?cond2}TTT{:cond2}FFF{/cond2}{:cond}fff{/cond}>" | |
| .match(/^(.*?)(?:{([?#]?)(.+)}(?:(.*?)(?:{\:\3}(.*)?)?{\/\3}))(.*?)$/) | |
| "<{?cond}ttt{?cond2}TTT{:cond2}FFF{/cond2}{:cond}fff{/cond}>" | |
| .match(/^(.*?)(?:(\$)?(\w+)}|{([?#]?)(.+)}(?:(.*?)(?:{\:\5}(.*)?)?{\/\5}))(.*?)$/) | |
| "<{value}{value}{value}>" |
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
| <p> | |
| gistと連携したと聞いて。 | |
| </p> |