スマホでボタンタップ時に押下した見た目に変更したいという要件に対応したときのメモ。
(意味あんのかな。。。)

  1. jQueryを使用。
  2. iPhoneとAndroidで動作確認。
  3. PC確認用にマウスオーバー時の動作も追加。
クラス名「hoge」を指定した要素をタップした際に、その要素に対してクラス名「tap」を追加します。

$(document).ready(function(){
    /* タッチの開始時のイベント */
    $('.hoge').bind('touchstart', function() {
		$(this).addClass('tap');
    });
 
    /* タッチの終了時のイベント */
    $('.hoge').bind('touchend', function() {
		$(this).removeClass('tap');
    });

    /* マウスオーバー時のイベント */
    $('.hoge').bind('mouseover', function() {
		$(this).addClass('tap');
    });
    /* マウスアウト時のイベント */
    $('.hoge').bind('mouseout', function() {
		$(this).removeClass('tap');
    });

});