From 08b17e71cb8c721597732547200c28b9818c5af5 Mon Sep 17 00:00:00 2001 From: Davide Bertola Date: Wed, 2 Feb 2011 03:46:35 +0800 Subject: [PATCH] Make button look pressed on touchstart event --- js/jquery.mobile.buttonMarkup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/jquery.mobile.buttonMarkup.js b/js/jquery.mobile.buttonMarkup.js index 50b150a7..a17de316 100644 --- a/js/jquery.mobile.buttonMarkup.js +++ b/js/jquery.mobile.buttonMarkup.js @@ -83,11 +83,11 @@ $.fn.buttonMarkup.defaults = { var attachEvents = function() { $(".ui-btn:not(.ui-disabled)").live({ - mousedown: function() { + "touchstart mousedown": function() { var theme = $(this).attr( "data-theme" ); $(this).removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-down-" + theme ); }, - mouseup: function() { + "touchmove touchend mouseup": function() { var theme = $(this).attr( "data-theme" ); $(this).removeClass( "ui-btn-down-" + theme ).addClass( "ui-btn-up-" + theme ); },