From 4db915a3c3b0b23495cb901c27356eb1a504f744 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Thu, 7 Oct 2010 11:39:23 -0400 Subject: [PATCH] if a button's iconpos is "notext" and it has no title attr, set its title attr to its text content --- js/jquery.mobile.buttonMarkup.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/jquery.mobile.buttonMarkup.js b/js/jquery.mobile.buttonMarkup.js index fc857c4e..c136d5f4 100644 --- a/js/jquery.mobile.buttonMarkup.js +++ b/js/jquery.mobile.buttonMarkup.js @@ -44,6 +44,11 @@ $.fn.buttonMarkup = function( options ){ if (o.iconpos){ buttonClass += " ui-btn-icon-" + o.iconpos; + + if( o.iconpos == 'notext' && !el.attr('title') ){ + el.attr('title', el.text() ); + } + }