iRonin
iRonin

Reputation: 470

How to make jQuery Mobile to display two-lines label (or, in general, to preserve HTML content of a button's label) in a Button component

It seems that by default jQuery Mobile strips the HTML content of a <button> tag.

So for instance placing a <br/> tag does not work.

Upvotes: 0

Views: 2124

Answers (1)

Leon
Leon

Reputation: 4532

Right, then don't use one ;-) So instead of :

<button>testing<br/>new<br/>lines</button>

Try this:

<a href="#" data-role="button">testing<br/>new<br/>lines</a>

Will achieve same effect - JQM will make it a button and center the text horizontally, and whatever HTML tags you have in there as well.

Hope this helps!

Upvotes: 2

Related Questions