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
$.fn.roleButton = function () { | |
return this.each(function (method) { | |
var $this, | |
isPressed; | |
function updatePressed () { | |
$this.attr('area-pressed', isPressed); | |
} | |
function changePressed () { | |
isPressed = !isPressed; | |
updatePressed(); |
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
$('#'); |
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
$(document).ready(function(){ | |
var isIE8 = document.getElementsByClassName == null; | |
var dColor = '#999999'; //ヒント(初期値)の文字色 | |
var fColor = '#373331'; //通常入力時の文字色 | |
var $inputHint = $('.input_hint'); | |
var defaultValue = $inputHint.val(); | |
var placeholder = $inputHint.attr('placeholder'); | |
if (isIE8) { | |
//初期状態の文字色 |
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
$.fn.imgLoaded = function (callback) { | |
return this.each(function() { | |
var self = this; | |
var $this = $(self); | |
var manifest = []; | |
var $imgs = $this.find('img'); | |
$imgs.hide(); | |
$imgs.each(function() { | |
var loaded = $.Deferred(); | |
var img = new Image(); |
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
function queryToJSON (query) { | |
query = query.replace(/^\?/, ''); | |
var knVList = query.split(/&|&/ig); | |
if (!knVList || !knVList[0]) return null; | |
var hash = {}; | |
var knV, key, val; | |
var _a; | |
for (var i = 0; i < knVList.length; i++) { | |
knV = knVList[i].split('='); | |
key = knV[0]; |
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
/* | |
* alternate-link.js | |
* v0.1.0-alpha | |
* 2014 MIT | |
*/ | |
;(function() { | |
"use strict"; | |
var alternateLink = this.alternateLink || {}; |
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
baser.event = baser.event || {}; | |
baser.event._scrollEvents = baser.event._scrollEvents || []; | |
baser.event._undevideScrollEvents = baser.event._undevideScrollEvents || []; | |
baser.event.scroll = baser.event.scroll || function (baserEventObject, undevide) { | |
if (baser.event._scrollEvents.length === 0) { | |
// 計算結果をアニメーションフレーム毎にDOMに反映 | |
var animation = new baser.ui.AnimationFrames(function () { |
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
// シングルクォートとダブルクォートの差はない | |
"\u3042"; // => "あ" | |
'\u3042'; // => "あ" | |
// 正規表現リテラルでも表現可能 | |
/\u3042/.test('あ'); // => true |
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
/** | |
* smartphone=off対応 | |
* | |
*/ | |
var key = 'smartphone'; | |
var val = 'off'; | |
var dir = 'sp'; | |
// URLパラメータにsmartphoneがある場合、 | |
// リンク先にもパラメータを追加する |
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
<input type="text" name="hoge" pattern="abc"> |
OlderNewer