question: public String html_tooltip ( String short_txt , String popup_txt ) { String out = "" ; if ( jquery ) { out = String . format ( "<div title='%s'>%s</div>" , popup_txt , short_txt ) ; } else if ( jqueryMobile ) { String popup = String . format ( "<div data-role=popup id=popup%d>\n" + "  <p>%s</p>\n" + "</div>\n" , popupId , popup_txt ) ; String txt = String . format ( "<a href=#popup%d data-rel=popup>%s</a>" , popupId ++ , short_txt ) ; out = popup + txt ; } return out ; }
target:  Create HTMl for some text and a popup 