Search code examples
htmlradio-buttonsuperscriptliferay-aui

How to use superscript HTML code with radio button label with AUI


How to use superscript external HTML code with radio button label along with AUI

<aui:input type="radio" name="radio" value="radio" label="Radio Button"></aui:input>

tried with implementing label, but it's not acceptable.

    <aui:input type="radio" name="radio" value="radio" label="Radio Button <sup>15</sup>"></aui:input>

needs to code dynamically.


Solution

  • LifeRay code

    <aui:input cssClass="radio-btn" type="radio" name="radio" value="radio" label="Radio Button"></aui:input>
    

    AUI Script

    AUI().use('aui-autocomplete', function(A) {
            A.one('.radio-btn label').append("<sup>15</sup>"); });