if a button's iconpos is "notext" and it has no title attr, set its title attr to its text content

This commit is contained in:
scottjehl 2010-10-07 11:39:23 -04:00
parent 5c3d35574f
commit 4db915a3c3

View file

@ -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() );
}
}