From cd0ad522ba7e129449583de5fc89e471ad6c8cd4 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Thu, 7 Apr 2011 15:28:52 -0400 Subject: [PATCH] moved the active state vclick to navigation --- js/jquery.mobile.buttonMarkup.js | 3 --- js/jquery.mobile.navigation.js | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/js/jquery.mobile.buttonMarkup.js b/js/jquery.mobile.buttonMarkup.js index 408360d8..4bf4e369 100644 --- a/js/jquery.mobile.buttonMarkup.js +++ b/js/jquery.mobile.buttonMarkup.js @@ -98,9 +98,6 @@ var attachEvents = function() { "vmouseout blur": function() { var theme = $(this).attr( "data-" + $.mobile.ns + "theme" ); $(this).removeClass( "ui-btn-hover-" + theme ).addClass( "ui-btn-up-" + theme ); - }, - "vclick": function() { - $(this).addClass( $.mobile.activeBtnClass ); } }); diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 02faf2f6..3f8b152d 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -685,6 +685,11 @@ ); event.preventDefault(); }); + + //add active state on vclick + $( "a" ).live( "vclick", function(){ + $(this).closest( ".ui-btn" ).addClass( $.mobile.activeBtnClass ); + }); //click routing - direct to HTTP or Ajax, accordingly